CVE-2023-25801: TensorFlow: double-free in pooling ops enables RCE

HIGH PoC AVAILABLE
Published March 25, 2023
CISO Take

A double-free (CWE-415) in TensorFlow's fractional pooling operations allows a low-privilege local attacker to corrupt the heap and execute arbitrary code within the ML process. Shared GPU training clusters and CI/CD ML pipelines are the highest-risk environments given multi-tenant local access. Upgrade to TensorFlow 2.12.0 or 2.11.1 immediately—no workaround fully substitutes for patching.

What is the risk?

CVSS 7.8 with AV:L/AC:L/PR:L/UI:N means exploitation is straightforward once local access exists—no user interaction, no complex prerequisites. The real risk multiplier for AI/ML environments is shared infrastructure: multi-tenant GPU clusters, Jupyter environments, and ML CI pipelines commonly grant the low-privilege access level this exploit requires. Not in CISA KEV and not remotely exploitable, but high impact on confidentiality, integrity, and availability of model assets if triggered.

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.8 / 10
EPSS
0.1%
chance of exploitation in 30 days
Higher than 4% of all CVEs
Exploitation Status
Exploit Available
Exploitation: MEDIUM
Sophistication
Moderate
Exploitation Confidence
medium
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 Local
AC Low
PR Low
UI None
S Unchanged
C High
I High
A High

What should I do?

5 steps
  1. PATCH

    Upgrade TensorFlow to 2.12.0 or 2.11.1. Treat as urgent on shared/multi-tenant training clusters.

  2. AUDIT

    Inventory all environments and container images pinning TensorFlow versions below the patched threshold.

  3. WORKAROUND

    If immediate patching is blocked, add input validation to enforce pooling_ratio[0] == 1.0 and pooling_ratio[3] == 1.0 before any call to fractional pooling ops.

  4. HARDEN

    Enforce least-privilege on shared GPU nodes; isolate ML training jobs in separate containers or VMs.

  5. DETECT

    Monitor TensorFlow training processes for unexpected crashes or segmentation faults as signals of attempted exploitation.

What does CISA's SSVC say?

Decision Track
Exploitation none
Automatable No
Technical Impact total

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
Art. 15 - Accuracy, Robustness and Cybersecurity
ISO 42001
A.10.1 - Information security for AI systems
NIST AI RMF
MANAGE 2.2 - Risk Treatment of Identified AI Risks
OWASP LLM Top 10
LLM05:2025 - Insecure Output Handling / Supply Chain Vulnerabilities

Frequently Asked Questions

What is CVE-2023-25801?

A double-free (CWE-415) in TensorFlow's fractional pooling operations allows a low-privilege local attacker to corrupt the heap and execute arbitrary code within the ML process. Shared GPU training clusters and CI/CD ML pipelines are the highest-risk environments given multi-tenant local access. Upgrade to TensorFlow 2.12.0 or 2.11.1 immediately—no workaround fully substitutes for patching.

Is CVE-2023-25801 actively exploited?

Proof-of-concept exploit code is publicly available for CVE-2023-25801, increasing the risk of exploitation.

How to fix CVE-2023-25801?

1. PATCH: Upgrade TensorFlow to 2.12.0 or 2.11.1. Treat as urgent on shared/multi-tenant training clusters. 2. AUDIT: Inventory all environments and container images pinning TensorFlow versions below the patched threshold. 3. WORKAROUND: If immediate patching is blocked, add input validation to enforce pooling_ratio[0] == 1.0 and pooling_ratio[3] == 1.0 before any call to fractional pooling ops. 4. HARDEN: Enforce least-privilege on shared GPU nodes; isolate ML training jobs in separate containers or VMs. 5. DETECT: Monitor TensorFlow training processes for unexpected crashes or segmentation faults as signals of attempted exploitation.

What systems are affected by CVE-2023-25801?

This vulnerability affects the following AI/ML architecture patterns: training pipelines, model serving, shared GPU clusters, ML CI/CD pipelines, Jupyter/notebook environments.

What is the CVSS score for CVE-2023-25801?

CVE-2023-25801 has a CVSS v3.1 base score of 7.8 (HIGH). The EPSS exploitation probability is 0.15%.

What is the AI security impact?

Affected AI Architectures

training pipelinesmodel servingshared GPU clustersML CI/CD pipelinesJupyter/notebook environments

MITRE ATLAS Techniques

AML.T0010.001 AI Software
AML.T0035 AI Artifact Collection
AML.T0049 Exploit Public-Facing Application

Compliance Controls Affected

EU AI Act: Art. 15
ISO 42001: A.10.1
NIST AI RMF: MANAGE 2.2
OWASP LLM Top 10: LLM05:2025

What are the technical details?

Original Advisory

TensorFlow is an open source machine learning platform. Prior to versions 2.12.0 and 2.11.1, `nn_ops.fractional_avg_pool_v2` and `nn_ops.fractional_max_pool_v2` require the first and fourth elements of their parameter `pooling_ratio` to be equal to 1.0, as pooling on batch and channel dimensions is not supported. A fix is included in TensorFlow 2.12.0 and 2.11.1.

Exploitation Scenario

An adversary with low-privilege access to a shared ML training cluster—common in enterprise data science environments—submits a training job or imports a crafted model checkpoint that invokes fractional_avg_pool_v2 with a pooling_ratio where index 0 or 3 is not 1.0. This triggers a double-free in TensorFlow's C++ backend, corrupting the process heap. A skilled attacker weaponizes the heap corruption into arbitrary code execution within the training process context, enabling theft of proprietary model weights stored in memory, access to training dataset batches, or use of the compromised node as a pivot point into internal ML infrastructure.

Weaknesses (CWE)

CWE-415 — Double Free: The product calls free() twice on the same memory address.

  • [Architecture and Design] Choose a language that provides automatic memory management.
  • [Implementation] Ensure that each allocation is freed only once. After freeing a chunk, set the pointer to NULL to ensure the pointer cannot be freed again. In complicated error conditions, be sure that clean-up routines respect the state of allocation properly. If the language is object oriented, ensure that object destructors delete each chunk of memory only once.

Source: MITRE CWE corpus.

CVSS Vector

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Timeline

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

Related Vulnerabilities