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.

What is the risk?

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.

What systems are affected?

Package Ecosystem Vulnerable Range Patched
TensorFlow pip No patch
195.8K OpenSSF 7.1 3.7K dependents Pushed 3d ago 4% patched ~1372d to patch Full package profile →

Do you use TensorFlow? You're affected.

How severe is it?

CVSS 3.1
7.5 / 10
EPSS
0.4%
chance of exploitation in 30 days
Higher than 35% 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, VulnCheck KEV, CISA SSVC, EPSS, Metasploit, Exploit-DB, trickest/cve, Nuclei templates, and inthewild.io exploitation reports.

What is the 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

What should I do?

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

What does CISA's SSVC say?

Decision Track*
Exploitation poc
Automatable Yes
Technical Impact partial

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:

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.45%.

What is the AI security impact?

Affected AI Architectures

model servingtraining pipelinesML API endpoints

MITRE ATLAS Techniques

AML.T0010.001 AI Software
AML.T0029 Denial of AI Service
AML.T0049 Exploit Public-Facing Application

Compliance Controls Affected

EU AI Act: Article 9
ISO 42001: 8.4
NIST AI RMF: GOVERN-6.1, MANAGE-2.2
OWASP LLM Top 10: LLM05:2025

What are the technical details?

Original Advisory

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)

CWE-476 — NULL Pointer Dereference: The product dereferences a pointer that it expects to be valid but is NULL.

  • [Implementation] For any pointers that could have been modified or provided from a function that can return NULL, check the pointer for NULL before use. When working with a multithreaded or otherwise asynchronous environment, ensure that proper locking APIs are used to lock before the check, and unlock when it has finished [REF-1484].
  • [Requirements] Select a programming language that is not susceptible to these issues.

Source: MITRE CWE corpus.

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