VDB
Sign up
MEDIUM6.5

PYSEC-2022-81

Quick fix

PYSEC-2022-81 — tensorflow-cpu: upgrade to the fixed version with the command below.

pip install --upgrade 'tensorflow-cpu>=cb164786dc891ea11d3a900e90367c339305dc7b'

Details

Tensorflow is an Open Source Machine Learning Framework. Under certain scenarios, TensorFlow can fail to specialize a type during shape inference. This case is covered by the `DCHECK` function however, `DCHECK` is a no-op in production builds and an assertion failure in debug builds. In the first case execution proceeds to the `ValueOrDie` line. This results in an assertion failure as `ret` contains an error `Status`, not a value. In the second case we also get a crash due to the assertion failure. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, and TensorFlow 2.6.3, as these are also affected and still in supported range.

Are you affected?

Enter the version of the package you're using.

Affected packages

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

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-cpu"]}'