CVE-2022-23574: TensorFlow: heap OOB read/write enables network RCE
HIGH PoC AVAILABLE CISA: ATTENDA typo in TensorFlow's type specialization logic allows heap out-of-bounds read and write, reachable over the network by any low-privileged user — effectively a remote code execution primitive in any publicly exposed TF serving endpoint. Patch to TensorFlow 2.8.0, 2.7.1, or 2.6.3 immediately. If patching is blocked, isolate TensorFlow inference endpoints behind authentication and network controls.
What is the risk?
CVSS 8.8 with network vector and low privileges required makes this exploitable by any authenticated API user — including multi-tenant ML platform users or model submission endpoints. The heap corruption primitive (both read and write) is a strong foundation for RCE. No CISA KEV listing suggests no confirmed active exploitation as of publication, but the vulnerability class and a public PoC reference in the advisory lower the bar significantly. Risk is HIGH for organizations running exposed TensorFlow serving infrastructure.
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| TensorFlow | pip | — | No patch |
Do you use TensorFlow? You're affected.
How severe is it?
What is the attack surface?
What should I do?
5 steps-
PATCH
Upgrade to TensorFlow 2.8.0, 2.7.1, or 2.6.3 — the fix is commit 0657c83d.
-
NETWORK CONTROLS
Restrict TensorFlow inference APIs to authenticated, authorized internal networks only.
-
INPUT VALIDATION
Reject externally submitted model graphs or tensor operations until patched.
-
DETECTION
Monitor for heap corruption indicators (crashes, SIGABRT, ASAN alerts) in TF serving processes; review audit logs for anomalous graph submission activity.
-
INVENTORY
Audit all TF version deployments — CI/CD build containers and notebooks are common overlooked surfaces.
What does CISA's SSVC say?
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2022-23574?
A typo in TensorFlow's type specialization logic allows heap out-of-bounds read and write, reachable over the network by any low-privileged user — effectively a remote code execution primitive in any publicly exposed TF serving endpoint. Patch to TensorFlow 2.8.0, 2.7.1, or 2.6.3 immediately. If patching is blocked, isolate TensorFlow inference endpoints behind authentication and network controls.
Is CVE-2022-23574 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2022-23574, increasing the risk of exploitation.
How to fix CVE-2022-23574?
1. PATCH: Upgrade to TensorFlow 2.8.0, 2.7.1, or 2.6.3 — the fix is commit 0657c83d. 2. NETWORK CONTROLS: Restrict TensorFlow inference APIs to authenticated, authorized internal networks only. 3. INPUT VALIDATION: Reject externally submitted model graphs or tensor operations until patched. 4. DETECTION: Monitor for heap corruption indicators (crashes, SIGABRT, ASAN alerts) in TF serving processes; review audit logs for anomalous graph submission activity. 5. INVENTORY: Audit all TF version deployments — CI/CD build containers and notebooks are common overlooked surfaces.
What systems are affected by CVE-2022-23574?
This vulnerability affects the following AI/ML architecture patterns: model serving, training pipelines, ML platform multi-tenant environments, notebook/interactive compute environments.
What is the CVSS score for CVE-2022-23574?
CVE-2022-23574 has a CVSS v3.1 base score of 8.8 (HIGH). The EPSS exploitation probability is 0.82%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0010.001 AI Software AML.T0040 AI Model Inference API Access AML.T0049 Exploit Public-Facing Application Compliance Controls Affected
What are the technical details?
Original Advisory
Tensorflow is an Open Source Machine Learning Framework. There is a typo in TensorFlow's `SpecializeType` which results in heap OOB read/write. Due to a typo, `arg` is initialized to the `i`th mutable argument in a loop where the loop index is `j`. Hence it is possible to assign to `arg` from outside the vector of arguments. Since this is a mutable proto value, it allows both read and write to outside of bounds data. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, and TensorFlow 2.6.3, as these are also affected and still in supported range.
Exploitation Scenario
An adversary with legitimate low-privilege access to a multi-tenant ML platform (e.g., an internal model registry or shared TF Serving endpoint) crafts a model graph containing a tensor operation that triggers the `SpecializeType` loop bug. The off-by-one iterator causes `arg` to reference memory outside the mutable arguments vector. The attacker uses the heap read primitive to leak memory layout and defeat ASLR, then uses the heap write primitive to overwrite a function pointer or return address, achieving arbitrary code execution on the ML serving node. From there, lateral movement to training infrastructure, model storage, or data pipelines follows.
Weaknesses (CWE)
CWE-125 — Out-of-bounds Read: The product reads data past the end, or before the beginning, of the intended buffer.
- [Implementation] Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue." Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylis
- [Architecture and Design] Use a language that provides appropriate memory abstractions.
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H References
- github.com/tensorflow/tensorflow/blob/a1320ec1eac186da1d03f033109191f715b2b130/tensorflow/core/framework/full_type_util.cc Exploit 3rd Party
- github.com/tensorflow/tensorflow/commit/0657c83d08845cc434175934c642299de2c0f042 Patch 3rd Party
- github.com/tensorflow/tensorflow/security/advisories/GHSA-77gp-3h4r-6428 Patch 3rd Party
Timeline
Related Vulnerabilities
CVE-2020-15196 9.9 TensorFlow: heap OOB read in sparse/ragged count ops
Same package: tensorflow CVE-2020-15205 9.8 TensorFlow: heap overflow in StringNGrams, ASLR bypass
Same package: tensorflow CVE-2020-15208 9.8 TFLite: OOB read/write via tensor dimension mismatch
Same package: tensorflow CVE-2019-16778 9.8 TensorFlow: heap overflow in UnsortedSegmentSum op
Same package: tensorflow CVE-2022-23587 9.8 TensorFlow: integer overflow in Grappler enables RCE
Same package: tensorflow