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.

Risk Assessment

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.

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.8 / 10
EPSS
0.1%
chance of exploitation in 30 days
Higher than 25% 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, CISA SSVC, EPSS, trickest/cve, and Nuclei templates.

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

Recommended Action

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.

CISA SSVC Assessment

Decision Track
Exploitation none
Automatable No
Technical Impact total

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

Technical Details

NVD Description

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)

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