Code Injection in TensorFlow - CVE-2022-29216

 

Code Injection in TensorFlow - CVE-2022-29216

Published: May 17, 2022 / Updated: May 3, 2026


Vulnerability identifier: #VU129146
CSH Severity: Medium
CVSS v4: 8.4 [CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2022-29216
CWE-ID: CWE-94
Exploitation vector: Local access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a local user to execute arbitrary code.

The vulnerability exists due to code injection in saved_model_cli when parsing user-supplied input expressions. A local user can supply a specially crafted --input_exprs argument to execute arbitrary code.

The vulnerable code path is reachable through compatibility handling for numpy expressions, and exploitation requires manual use of the tool.


Affected software

TensorFlow

How to mitigate CVE-2022-29216

Install security update from vendor's website.

TensorFlow - addressed in versions 2.6.4, 2.7.2, 2.8.1, 2.9.0

External References

Related Security Bulletins