CVE-2023-25665: TensorFlow: null ptr deref DoS via sparse tensors
HIGH PoC AVAILABLE CISA: TRACK*Any TensorFlow deployment exposing model endpoints that accept sparse tensor inputs is vulnerable to unauthenticated remote crash — effectively a DoS with zero prerequisites. Patch to TF 2.12.0 or 2.11.1 immediately; if patching is delayed, restrict network access to inference endpoints and validate tensor inputs at the API gateway layer. Not actively exploited in the wild, but trivial to trigger.
Risk Assessment
High severity (CVSS 7.5) with network-accessible, zero-interaction, zero-privilege attack vector makes this readily exploitable against exposed TensorFlow serving endpoints. Impact is limited to availability — no data exfiltration or code execution path. Real-world risk depends heavily on exposure: internal-only training clusters face minimal risk, while public-facing ML inference APIs are directly in scope. Not in CISA KEV and no public PoC exploitation reported, reducing urgency marginally.
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.12.0 or 2.11.1 — the only complete fix.
-
WORKAROUND
Add input validation before SparseSparseMaximum calls to verify tensor indices/values are non-null and within valid ranges.
-
NETWORK CONTROLS
Restrict inference API access to authenticated, authorized clients only; use API gateway rate-limiting to reduce DoS blast radius.
-
DETECTION
Monitor for repeated process crashes or pod restarts in ML serving infrastructure; alert on abnormal TensorFlow exception rates.
-
AUDIT
Identify all internal services consuming TF versions < 2.11.1 via dependency scanning (pip list, requirements.txt audit).
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-2023-25665?
Any TensorFlow deployment exposing model endpoints that accept sparse tensor inputs is vulnerable to unauthenticated remote crash — effectively a DoS with zero prerequisites. Patch to TF 2.12.0 or 2.11.1 immediately; if patching is delayed, restrict network access to inference endpoints and validate tensor inputs at the API gateway layer. Not actively exploited in the wild, but trivial to trigger.
Is CVE-2023-25665 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2023-25665, increasing the risk of exploitation.
How to fix CVE-2023-25665?
1. PATCH: Upgrade to TensorFlow 2.12.0 or 2.11.1 — the only complete fix. 2. WORKAROUND: Add input validation before SparseSparseMaximum calls to verify tensor indices/values are non-null and within valid ranges. 3. NETWORK CONTROLS: Restrict inference API access to authenticated, authorized clients only; use API gateway rate-limiting to reduce DoS blast radius. 4. DETECTION: Monitor for repeated process crashes or pod restarts in ML serving infrastructure; alert on abnormal TensorFlow exception rates. 5. AUDIT: Identify all internal services consuming TF versions < 2.11.1 via dependency scanning (pip list, requirements.txt audit).
What systems are affected by CVE-2023-25665?
This vulnerability affects the following AI/ML architecture patterns: model serving, training pipelines, ML API endpoints.
What is the CVSS score for CVE-2023-25665?
CVE-2023-25665 has a CVSS v3.1 base score of 7.5 (HIGH). The EPSS exploitation probability is 0.13%.
Technical Details
NVD Description
TensorFlow is an open source platform for machine learning. Prior to versions 2.12.0 and 2.11.1, when `SparseSparseMaximum` is given invalid sparse tensors as inputs, it can give a null pointer error. A fix is included in TensorFlow version 2.12 and version 2.11.1.
Exploitation Scenario
An adversary identifies a public-facing TensorFlow Serving endpoint (e.g., via Shodan for port 8501/8500, or through API documentation leakage). They craft a POST request to the predict API containing an intentionally malformed SparseSparseMaximum input — a sparse tensor with null or zero-length index arrays. TensorFlow dereferences the null pointer inside the kernel, triggering a segfault that crashes the serving process. In Kubernetes deployments, the crash loop can be sustained by repeating the request faster than the restart policy recovers, achieving sustained service disruption against ML-dependent applications such as fraud detection, content moderation, or recommendation engines.
Weaknesses (CWE)
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H References
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