Incorrect Calculation Affecting tensorflow package, versions [0,]


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.02% (3rd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PYTHON-TENSORFLOW-13052809
  • published26 Sept 2025
  • disclosed25 Sept 2025
  • creditShaoyu Yang

Introduced: 25 Sep 2025

NewCVE-2025-55556  (opens in a new tab)
CWE-682  (opens in a new tab)

How to fix?

There is no fixed version for tensorflow.

Overview

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to Incorrect Calculation via the Embedding operator that always outputs 0 without XLA when input_dim=1 is set. An attacker can cause the application to produce unpredictable or incorrect outputs by triggering compilation of the affected component.

PoC

import tensorflow as tf

tf.random.set_seed(42)
x = tf.constant([1])


# uncompiled model
class Model(tf.keras.Model):

    def __init__(self):
        super(Model, self).__init__()
        self.embedding = tf.keras.layers.Embedding(1, 1)

    def call(self, x):
        output = self.embedding(x)
        return output


m = Model()

output1 = m(x)


# compiled model
class Model(tf.keras.Model):

    def __init__(self):
        super(Model, self).__init__()
        self.embedding = tf.keras.layers.Embedding(1, 1)

    @tf.function(jit_compile=True)
    def call(self, x):
        output = self.embedding(x)
        return output


m = Model()
output2 = m(x)

print(output1)
print(output2)

CVSS Base Scores

version 4.0
version 3.1