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.
Risk Assessment
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.
Affected Systems
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| tensorflow | pip | — | No patch |
Do you use tensorflow? You're affected.
Severity & Risk
Attack Surface
Recommended Action
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.
CISA SSVC Assessment
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
Classification
Compliance Impact
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.30%.
Technical Details
NVD Description
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.
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
AI Threat Alert