Vulnerability · Published May 20, 2022 · Assigned by GitHub_M

CVE-2022-29216Code injection in `saved_model_cli` in TensorFlow

High 7.8

In plain English

A high-severity code injection in tensorflow from tensorflow. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.5% (higher than 46% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.8High
Exploit odds (30 days)0.5%top 53.9% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official description

TensorFlow is an open source platform for machine learning. Prior to versions 2.9.0, 2.8.1, 2.7.2, and 2.6.4, TensorFlow's `saved_model_cli` tool is vulnerable to a code injection. This can be used to open a reverse shell. This code path was maintained for compatibility reasons as the maintainers had several test cases where numpy expressions were used as arguments. However, given that the tool is always run manually, the impact of this is still not severe. The maintainers have now removed the `safe=False` argument, so all parsing is done without calling `eval`. The patch is available in versions 2.9.0, 2.8.1, 2.7.2, and 2.6.4.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
PyPItensorflow2.8.1GHSA-75c9-jrh4-79mc
PyPItensorflow2.6.4, 2.7.2, 2.8.1PYSEC-2026-3125
PyPItensorflow2.6.4GHSA-75c9-jrh4-79mc
PyPItensorflow2.7.2GHSA-75c9-jrh4-79mc
PyPItensorflow-cpu2.8.1GHSA-75c9-jrh4-79mc
PyPItensorflow-cpu2.6.4GHSA-75c9-jrh4-79mc
PyPItensorflow-cpu2.7.2GHSA-75c9-jrh4-79mc
PyPItensorflow-cpu2.6.4, 2.7.2, 2.8.1PYSEC-2026-3289
PyPItensorflow-gpu2.8.1GHSA-75c9-jrh4-79mc
PyPItensorflow-gpu2.6.4GHSA-75c9-jrh4-79mc
PyPItensorflow-gpu2.6.4, 2.7.2, 2.8.1PYSEC-2026-963
PyPItensorflow-gpu2.7.2GHSA-75c9-jrh4-79mc

Affected products (as reported)

VendorProductVersions
tensorflow tensorflow < 2.6.4>= 2.7.0rc0, < 2.7.2>= 2.8.0rc0, < 2.8.1>= 2.9.0rc0, < 2.9.0

Weakness: CWE-94 · Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

References