Skip to content
HighVulnerability

CVE-2022-29216: TensorFlow saved_model_cli code injection through eval of arguments

Identifier
CVE-2022-29216
Published
Record updated
View JSON
Affected
  • tensorflow < 2.6.4
  • tensorflow-cpu < 2.6.4
  • tensorflow-gpu < 2.6.4
  • and 6 more
Fixed in
2.6.4
  • tensorflow 2.6.4 released May 16, 2022, 5 days before disclosure
  • tensorflow-cpu 2.6.4 released May 16, 2022, 5 days before disclosure
  • tensorflow-gpu 2.6.4 released May 16, 2022, 5 days before disclosure
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
0.5%

Summary

TensorFlow versions before 2.9.0, 2.8.1, 2.7.2, and 2.6.4 contain a code injection flaw in the `saved_model_cli` tool that can be used to open a reverse shell. The code path existed for compatibility with test cases that pass numpy expressions as arguments, and the source notes the tool is always run manually, so the impact is described as not severe.

Mitigation

The maintainers 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.