# CVE-2022-29216: Code injection in `saved_model_cli` in TensorFlow

- Severity: High 7.8 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.55%, higher than 47% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2022-05-20T23:35:13.000Z
- Modified: 2026-09-08T08:48:20.382Z
- Also known as: GHSA-75c9-jrh4-79mc, BIT-TENSORFLOW-2022-29216, PYSEC-2026-3125, PYSEC-2026-3289, PYSEC-2026-963
- Weaknesses: CWE-94
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- tensorflow tensorflow: < 2.6.4; >= 2.7.0rc0, < 2.7.2; >= 2.8.0rc0, < 2.8.1; >= 2.9.0rc0, < 2.9.0
- tensorflow (PyPI): before 2.6.4; from 2.7.0 before 2.7.2; from 2.8.0 before 2.8.1
- tensorflow-cpu (PyPI): before 2.6.4; from 2.7.0 before 2.7.2; from 2.8.0 before 2.8.1
- tensorflow-gpu (PyPI): before 2.6.4; from 2.7.0 before 2.7.2; from 2.8.0 before 2.8.1
- google tensorflow: before 2.6.4; from 2.7.0 before 2.7.2; 2.7.0; 2.8.0; 2.9.0
- tensorflow (Bitnami): before 2.6.4; from 2.7.0 before 2.7.2; from 2.8.0 before 2.8.1

## Every score

- GitHub_M: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 4.6 Medium `AV:L/AC:L/Au:N/C:P/I:P/A:P`
- PyPA Advisory Database: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Bitnami Vulnerability Database: rating High

## References

- <https://github.com/tensorflow/tensorflow/security/advisories/GHSA-75c9-jrh4-79mc> (exploit, advisory, patch, third-party-advisory, web)
- <https://github.com/tensorflow/tensorflow/commit/8b202f08d52e8206af2bdb2112a62fafbc546ec7> (advisory, patch, third-party-advisory, web)
- <https://github.com/tensorflow/tensorflow/releases/tag/v2.6.4> (advisory, release-notes, third-party-advisory, web)
- <https://github.com/tensorflow/tensorflow/releases/tag/v2.7.2> (advisory, release-notes, third-party-advisory, web)
- <https://github.com/tensorflow/tensorflow/releases/tag/v2.8.1> (advisory, release-notes, third-party-advisory, web)
- <https://github.com/tensorflow/tensorflow/releases/tag/v2.9.0> (advisory, release-notes, third-party-advisory, web)
- <https://github.com/tensorflow/tensorflow/commit/c5da7af048611aa29e9382371f0aed5018516cac> (advisory, patch, third-party-advisory, web)
- <https://github.com/tensorflow/tensorflow/blob/f3b9bf4c3c0597563b289c0512e98d4ce81f886e/tensorflow/python/tools/saved_model_cli.py#L566-L574> (advisory, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-29216> (advisory, web)
- <https://github.com/tensorflow/tensorflow> (package)
- <https://pypi.org/project/tensorflow> (package)
- <https://github.com/advisories/GHSA-75c9-jrh4-79mc> (advisory)
- <https://pypi.org/project/tensorflow-cpu> (package)
- <https://pypi.org/project/tensorflow-gpu> (package)

## Sources

- CVE List: [CVE-2022-29216](https://www.cve.org/CVERecord?id=CVE-2022-29216), CVE Terms of Use, modified 2025-04-22
- GitHub Advisory Database: [GHSA-75c9-jrh4-79mc](https://github.com/advisories/GHSA-75c9-jrh4-79mc), CC-BY-4.0, modified 2026-07-13
- NVD: [CVE-2022-29216](https://nvd.nist.gov/vuln/detail/CVE-2022-29216), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2026-3125](https://osv.dev/vulnerability/PYSEC-2026-3125), CC-BY-4.0, modified 2026-07-13
- PyPA Advisory Database: [PYSEC-2026-3289](https://osv.dev/vulnerability/PYSEC-2026-3289), CC-BY-4.0, modified 2026-07-13
- PyPA Advisory Database: [PYSEC-2026-963](https://osv.dev/vulnerability/PYSEC-2026-963), CC-BY-4.0, modified 2026-07-13
- Bitnami Vulnerability Database: [BIT-TENSORFLOW-2022-29216](https://osv.dev/vulnerability/BIT-TENSORFLOW-2022-29216), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2022-29216 · Whole record: https://cve.day/CVE-2022-29216.json · Rebuilt by cve.day 2026-11-25T22:58:11.884Z
