CVE-2023-25665: TensorFlow: null ptr deref DoS via sparse tensors

HIGH PoC AVAILABLE CISA: TRACK*
Published March 25, 2023
CISO Take

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
195.0K OpenSSF 7.2 3.7K dependents Pushed today 4% patched ~1372d to patch Full package profile →

Do you use tensorflow? You're affected.

Severity & Risk

CVSS 3.1
7.5 / 10
EPSS
0.1%
chance of exploitation in 30 days
Higher than 31% of all CVEs
Exploitation Status
Exploit Available
Exploitation: MEDIUM
Sophistication
Trivial
Exploitation Confidence
medium
CISA SSVC: Public PoC
Public PoC indexed (trickest/cve)
Composite signal derived from CISA KEV, CISA SSVC, EPSS, trickest/cve, and Nuclei templates.

Attack Surface

AV AC PR UI S C I A
AV Network
AC Low
PR None
UI None
S Unchanged
C None
I None
A High

Recommended Action

5 steps
  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).

CISA SSVC Assessment

Decision Track*
Exploitation poc
Automatable Yes
Technical Impact partial

Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.

Classification

Compliance Impact

This CVE is relevant to:

EU AI Act
Article 9 - Risk management system
ISO 42001
8.4 - AI system operation and monitoring
NIST AI RMF
GOVERN-6.1 - Policies for third-party AI risks MANAGE-2.2 - Mechanisms to respond to and recover from AI risks
OWASP LLM Top 10
LLM05:2025 - Supply Chain Vulnerabilities

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

Timeline

Published
March 25, 2023
Last Modified
November 21, 2024
First Seen
March 25, 2023

Related Vulnerabilities