CVE-2022-23592: TensorFlow: heap OOB read in type inference engine
HIGH PoC AVAILABLE CISA: TRACK*TensorFlow's type inference skips bounds checking in production builds (DCHECK is a no-op), allowing a low-privileged remote attacker to read heap memory or crash the service. Any organization exposing a TF model serving endpoint should patch to TF 2.8.0 immediately. Treat this as urgent if your TF inference API is reachable from untrusted networks or multi-tenant environments.
What is the risk?
High risk for organizations running TensorFlow model serving endpoints accessible over the network. The combination of AV:N/AC:L/PR:L makes this trivially reachable—any authenticated (low-privilege) user of a TF serving API can trigger it. The confidentiality impact is HIGH due to heap memory disclosure, which may expose model weights, in-flight tensors, or adjacent memory. Availability is also HIGH due to potential crash/DoS. Not in CISA KEV and no known active exploitation, but the low complexity raises the odds of eventual weaponization.
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 or later immediately—this is the only version containing the fix (commit c99d98c).
-
Short-term: If patching is not immediately possible, restrict who can submit graphs to TF Serving endpoints—enforce authentication and authorization at the API gateway layer.
-
Network segmentation: Ensure TF inference endpoints are not internet-facing; place behind VPN or internal load balancers.
-
Detection: Monitor for abnormal crash/restart patterns in TF Serving processes (potential OOB exploitation attempts), or unusual memory access violations in application logs.
-
Supply chain audit: Inventory all internal services and containers running TF <2.8.0 using your SBOM or image scanning tooling.
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-23592?
TensorFlow's type inference skips bounds checking in production builds (DCHECK is a no-op), allowing a low-privileged remote attacker to read heap memory or crash the service. Any organization exposing a TF model serving endpoint should patch to TF 2.8.0 immediately. Treat this as urgent if your TF inference API is reachable from untrusted networks or multi-tenant environments.
Is CVE-2022-23592 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2022-23592, increasing the risk of exploitation.
How to fix CVE-2022-23592?
1. Patch: Upgrade to TensorFlow 2.8.0 or later immediately—this is the only version containing the fix (commit c99d98c). 2. Short-term: If patching is not immediately possible, restrict who can submit graphs to TF Serving endpoints—enforce authentication and authorization at the API gateway layer. 3. Network segmentation: Ensure TF inference endpoints are not internet-facing; place behind VPN or internal load balancers. 4. Detection: Monitor for abnormal crash/restart patterns in TF Serving processes (potential OOB exploitation attempts), or unusual memory access violations in application logs. 5. Supply chain audit: Inventory all internal services and containers running TF <2.8.0 using your SBOM or image scanning tooling.
What systems are affected by CVE-2022-23592?
This vulnerability affects the following AI/ML architecture patterns: model serving, training pipelines, inference API endpoints.
What is the CVSS score for CVE-2022-23592?
CVE-2022-23592 has a CVSS v3.1 base score of 8.1 (HIGH). The EPSS exploitation probability is 0.84%.
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. TensorFlow's type inference can cause a heap out of bounds read as the bounds checking is done in a `DCHECK` (which is a no-op during production). An attacker can control the `input_idx` variable such that `ix` would be larger than the number of values in `node_t.args`. The fix will be included in TensorFlow 2.8.0. This is the only affected version.
Exploitation Scenario
An attacker with low-privilege API access to a TF Serving instance (e.g., an internal ML platform with basic auth, or a multi-tenant SaaS that lets users run models) crafts a TensorFlow computation graph where the `input_idx` argument in a type inference call exceeds the number of actual node arguments. Because production TF builds strip DCHECK assertions, no bounds check occurs. The attacker submits this graph via the gRPC or REST inference API. TensorFlow reads beyond the valid heap allocation, potentially leaking adjacent memory contents—which in a busy inference server may include other users' tensor data, API credentials, or model weights. Repeated triggering can also crash the server (DoS). This is particularly dangerous in shared inference infrastructure serving multiple tenants.
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:N/A:H References
- github.com/tensorflow/tensorflow/blob/274df9b02330b790aa8de1cee164b70f72b9b244/tensorflow/core/graph/graph.cc Exploit 3rd Party
- github.com/tensorflow/tensorflow/commit/c99d98cd189839dcf51aee94e7437b54b31f8abd Patch 3rd Party
- github.com/tensorflow/tensorflow/security/advisories/GHSA-vq36-27g6-p492 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