{"id":"CVE-2022-29216","summary":"Code injection in `saved_model_cli` in TensorFlow","details":"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.","aliases":["BIT-tensorflow-2022-29216","GHSA-75c9-jrh4-79mc","PYSEC-2026-3125","PYSEC-2026-3289","PYSEC-2026-963"],"modified":"2026-10-22T10:33:00.603807256Z","published":"2022-05-20T23:35:13Z","database_specific":{"cwe_ids":["CWE-94"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/29xxx/CVE-2022-29216.json","cna_assigner":"GitHub_M"},"references":[{"type":"WEB","url":"https://github.com/tensorflow/tensorflow/blob/f3b9bf4c3c0597563b289c0512e98d4ce81f886e/tensorflow/python/tools/saved_model_cli.py#L566-L574"},{"type":"WEB","url":"https://github.com/tensorflow/tensorflow/releases/tag/v2.6.4"},{"type":"WEB","url":"https://github.com/tensorflow/tensorflow/releases/tag/v2.7.2"},{"type":"WEB","url":"https://github.com/tensorflow/tensorflow/releases/tag/v2.8.1"},{"type":"WEB","url":"https://github.com/tensorflow/tensorflow/releases/tag/v2.9.0"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/29xxx/CVE-2022-29216.json"},{"type":"ADVISORY","url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-75c9-jrh4-79mc"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-29216"},{"type":"FIX","url":"https://github.com/tensorflow/tensorflow/commit/8b202f08d52e8206af2bdb2112a62fafbc546ec7"},{"type":"FIX","url":"https://github.com/tensorflow/tensorflow/commit/c5da7af048611aa29e9382371f0aed5018516cac"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/tensorflow/tensorflow","events":[{"introduced":"0"},{"fixed":"33ed2b11cb8e879d86c371700e6573db1814a69e"},{"introduced":"c256c071bb26e1e13b4666d1b3e229e110bc914a"},{"fixed":"dd7b8a3c1714d0052ce4b4a2fd8dcef927439a24"},{"introduced":"ce35e5c3a8efdb8161c6a85c8fb9ffb5bbdc9ffd"},{"fixed":"8b202f08d52e8206af2bdb2112a62fafbc546ec7"},{"fixed":"c5da7af048611aa29e9382371f0aed5018516cac"},{"fixed":"0516d4d8bced506cae97dc3cb45dbd2fe4311f26"},{"fixed":"8a20d54a3c1bfa38c03ea99a2ad3c1b0a45dfa95"}],"database_specific":{"extracted_events":[{"range":[{"introduced":"0"},{"fixed":"2.6.4"}],"source":"CPE_RANGE","cpe":"cpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:*"},{"cpe":"cpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:*","range":[{"introduced":"2.7.0"},{"fixed":"2.7.2"}],"source":"CPE_RANGE"},{"cpe":"cpe:2.3:a:google:tensorflow:2.7.0:rc0:*:*:*:*:*:*","range":[{"introduced":"2.7.0-rc0"},{"last_affected":"2.7.0-rc0"}],"source":"CPE_STRING"},{"cpe":"cpe:2.3:a:google:tensorflow:2.7.0:rc1:*:*:*:*:*:*","range":[{"introduced":"2.7.0-rc1"},{"last_affected":"2.7.0-rc1"}],"source":"CPE_STRING"},{"cpe":"cpe:2.3:a:google:tensorflow:2.8.0:-:*:*:*:*:*:*","range":[{"introduced":"2.8.0-NA"},{"last_affected":"2.8.0-NA"}],"source":"CPE_STRING"},{"range":[{"introduced":"2.8.0-rc0"},{"last_affected":"2.8.0-rc0"}],"source":"CPE_STRING","cpe":"cpe:2.3:a:google:tensorflow:2.8.0:rc0:*:*:*:*:*:*"},{"cpe":"cpe:2.3:a:google:tensorflow:2.8.0:rc1:*:*:*:*:*:*","range":[{"introduced":"2.8.0-rc1"},{"last_affected":"2.8.0-rc1"}],"source":"CPE_STRING"},{"range":[{"introduced":"2.9.0-rc0"},{"last_affected":"2.9.0-rc0"}],"source":"CPE_STRING","cpe":"cpe:2.3:a:google:tensorflow:2.9.0:rc0:*:*:*:*:*:*"},{"range":[{"introduced":"2.9.0-rc1"},{"last_affected":"2.9.0-rc1"}],"source":"CPE_STRING","cpe":"cpe:2.3:a:google:tensorflow:2.9.0:rc1:*:*:*:*:*:*"},{"range":[{"fixed":"8b202f08d52e8206af2bdb2112a62fafbc546ec7"}],"source":"REFERENCES_COMMIT"},{"source":"REFERENCES_COMMIT","range":[{"fixed":"c5da7af048611aa29e9382371f0aed5018516cac"}]},{"original_tag":"v2.6.4","range":[{"fixed":"33ed2b11cb8e879d86c371700e6573db1814a69e"}],"source":"REFERENCES_TAG"},{"range":[{"fixed":"dd7b8a3c1714d0052ce4b4a2fd8dcef927439a24"}],"source":"REFERENCES_TAG","original_tag":"v2.7.2"},{"original_tag":"v2.8.1","range":[{"fixed":"0516d4d8bced506cae97dc3cb45dbd2fe4311f26"}],"source":"REFERENCES_TAG"},{"source":"REFERENCES_TAG","original_tag":"v2.9.0","range":[{"fixed":"8a20d54a3c1bfa38c03ea99a2ad3c1b0a45dfa95"}]}]}}],"versions":["2.7.0-rc0","2.7.0-rc1","2.8.0-NA","2.8.0-rc0","2.8.0-rc1","2.9.0-rc0","2.9.0-rc1","v2.6.3","v2.7.1","v2.6.2","v2.7.0","v2.6.1","v2.6.0","v2.6.0-rc2","v2.6.0-rc1","v2.6.0-rc0","v1.12.1","v1.9.0-rc2","v1.6.0-rc1","v1.1.0-rc2","v1.1.0-rc1","0.6.0","0.5.0"],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-29216.json"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"}]}