{"id":"CVE-2022-29216","published":"2022-05-20T23:35:13Z","modified":"2025-04-22T17:56:38Z","title":"Code injection in `saved_model_cli` in TensorFlow","vendor":"tensorflow","product":"tensorflow","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00549,"percentile":0.46859,"provenance":"source"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"references":[{"url":"https://github.com/tensorflow/tensorflow/commit/8b202f08d52e8206af2bdb2112a62fafbc546ec7","tags":["x_refsource_MISC"]},{"url":"https://github.com/tensorflow/tensorflow/releases/tag/v2.6.4","tags":["x_refsource_MISC"]},{"url":"https://github.com/tensorflow/tensorflow/releases/tag/v2.7.2","tags":["x_refsource_MISC"]},{"url":"https://github.com/tensorflow/tensorflow/releases/tag/v2.8.1","tags":["x_refsource_MISC"]},{"url":"https://github.com/tensorflow/tensorflow/releases/tag/v2.9.0","tags":["x_refsource_MISC"]},{"url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-75c9-jrh4-79mc","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/tensorflow/tensorflow/commit/c5da7af048611aa29e9382371f0aed5018516cac","tags":["x_refsource_MISC"]},{"url":"https://github.com/tensorflow/tensorflow/blob/f3b9bf4c3c0597563b289c0512e98d4ce81f886e/tensorflow/python/tools/saved_model_cli.py#L566-L574","tags":["x_refsource_MISC"]}],"priority":{"score":14.8,"factors":[{"name":"EPSS percentile","points":9.37},{"name":"CVSS severity","points":5.46}]},"vendorSlug":"tensorflow","affectedVersions":[{"vendor":"tensorflow","product":"tensorflow","versions":["< 2.6.4",">= 2.7.0rc0, < 2.7.2",">= 2.8.0rc0, < 2.8.1",">= 2.9.0rc0, < 2.9.0"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2025-04-22T15:43:15.365425Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"tensorflow","vulnerableRanges":["<2.6.4",">=2.7.0, <2.7.2",">=2.8.0, <2.8.1"],"patched":["2.6.4","2.7.2","2.8.1"],"from":["GHSA-75c9-jrh4-79mc","PYSEC-2026-3125"],"provenance":"source"},{"ecosystem":"PyPI","package":"tensorflow-cpu","vulnerableRanges":["<2.6.4",">=2.7.0, <2.7.2",">=2.8.0, <2.8.1"],"patched":["2.6.4","2.7.2","2.8.1"],"from":["GHSA-75c9-jrh4-79mc","PYSEC-2026-3289"],"provenance":"source"},{"ecosystem":"PyPI","package":"tensorflow-gpu","vulnerableRanges":["<2.6.4",">=2.7.0, <2.7.2",">=2.8.0, <2.8.1"],"patched":["2.6.4","2.7.2","2.8.1"],"from":["GHSA-75c9-jrh4-79mc","PYSEC-2026-963"],"provenance":"source"}],"summary":{"text":"The saved_model_cli command-line tool in TensorFlow contains a code injection flaw, because its argument parsing calls eval on user-supplied input, which allows arbitrary code to run in the tool's context. An attacker who can get a user to run the tool with crafted arguments, or who controls those arguments, can execute code and open a reverse shell; the attack requires local access and low privileges, with the tool typically run manually by the user.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:32:09Z"},"euvd":{"id":"EUVD-2022-2924","exploited":false,"provenance":"source"}}