CVE-2022-29216

Code injection in `saved_model_cli` in TensorFlow

HIGH
7.8
CVSS Score
Published: May 20, 2022 at 11:35 PM UTC
Updated: June 17, 2026 at 04:39 AM UTC
2 products affected across 2 vendorsTensorflowTensorFlow

Using tensorflow by tensorflow?

Get instant alerts when new vulnerabilities affect tensorflow - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.8
Exploit prediction
EPSS 0.5%
SSVC
PoC

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

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

Affected range stops below 2.6.4, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.7.2, so it looks safe — our inference, not a vendor statement
v < 2.6.4v < 2.7.2v < 2.8.1v < 2.9.0
Affected range stops below 2.6.4, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.7.2, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.8.1, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.9.0, so it looks safe — our inference, not a vendor statement

SSVC — Action Prioritization

SSVCPoCNot automatableTotal impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

7.8HIGHGitHub_M
Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-94

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card