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.
Risk Assessment
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.
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 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.
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-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.32%.
Technical Details
NVD Description
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)
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
AI Threat Alert