VDB
Sign up
MEDIUM5.5

PYSEC-2021-191

Quick fix

PYSEC-2021-191 — tensorflow: upgrade to the fixed version with the command below.

pip install --upgrade 'tensorflow>=da5ff2daf618591f64b2b62d9d9803951b945e9f'

Details

TensorFlow is an end-to-end open source platform for machine learning. An attacker can cause a denial of service via a FPE runtime error in `tf.raw_ops.DenseCountSparseOutput`. This is because the implementation(https://github.com/tensorflow/tensorflow/blob/efff014f3b2d8ef6141da30c806faf141297eca1/tensorflow/core/kernels/count_ops.cc#L123-L127) computes a divisor value from user data but does not check that the result is 0 before doing the division. Since `data` is given by the `values` argument, `num_batch_elements` is 0. The fix will be included in TensorFlow 2.5.0. We will also cherrypick this commit on TensorFlow 2.4.2, and TensorFlow 2.3.3, as these are also affected.

Are you affected?

Enter the version of the package you're using.

Affected packages

PyPI/tensorflow
Introduced in: 0Fixed in: da5ff2daf618591f64b2b62d9d9803951b945e9f
Fixpip install --upgrade 'tensorflow>=da5ff2daf618591f64b2b62d9d9803951b945e9f'

References

Check it before you install it

One call answers whether to add this package: known advisories, CISA KEV, and whether the name is a hallucinated or freshly squatted one. No key needed to try it.

curl -s https://vdb.ai.kr/v1/ai/check-packages \
  -H 'Content-Type: application/json' \
  -d '{"packages":["pkg:pypi/tensorflow"]}'