CVE-2023-25801: TensorFlow: double-free in pooling ops enables RCE
HIGH PoC AVAILABLEA 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 |
Do you use tensorflow? You're affected.
Severity & Risk
Attack Surface
Recommended Action
5 steps-
PATCH
Upgrade TensorFlow to 2.12.0 or 2.11.1. Treat as urgent on shared/multi-tenant training clusters.
-
AUDIT
Inventory all environments and container images pinning TensorFlow versions below the patched threshold.
-
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.
-
HARDEN
Enforce least-privilege on shared GPU nodes; isolate ML training jobs in separate containers or VMs.
-
DETECT
Monitor TensorFlow training processes for unexpected crashes or segmentation faults as signals of attempted exploitation.
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-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 References
- github.com/tensorflow/tensorflow/commit/ee50d1e00f81f62a4517453f721c634bbb478307 Patch
- github.com/tensorflow/tensorflow/security/advisories/GHSA-f49c-87jh-g47q Patch Vendor
- github.com/YoussefJeridi/vulTenserflow Exploit
- github.com/YoussefJeridi/vulTensorflow Exploit
- github.com/iotdscreator/iotdscreator-dataset Exploit
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