CVE-2023-25667: TensorFlow: integer overflow DoS in video frame decoding
HIGH PoC AVAILABLEAny TensorFlow deployment that accepts image or video input from untrusted sources is exploitable without authentication — an attacker can crash the process by sending a crafted frame buffer exceeding 2^31 pixels in total size. Upgrade to TensorFlow 2.12.0 or 2.11.1 immediately; if patching is delayed, validate input dimensions before they reach TF decode operations. No active exploitation reported, but the low-complexity network vector makes this a realistic threat to exposed model-serving endpoints.
Risk Assessment
CVSS 7.5 High with AV:N/AC:L/PR:N/UI:N makes this trivially exploitable from the network with no credentials. Impact is limited to availability (no code execution, no data disclosure), but crashing a TensorFlow serving process in production causes direct revenue and SLA impact. Risk is highest for organizations exposing TF Serving or custom Flask/FastAPI endpoints that pass raw image/video bytes directly into TensorFlow ops. On-premises and cloud inference APIs accepting multipart uploads or video URLs are the primary attack surface.
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 to TensorFlow ≥2.12.0 or ≥2.11.1. Both branches contain the fix (commit 8dc723f).
-
WORKAROUND
Enforce strict input validation before TF ops — reject images where num_frames × height × width × channels ≥ 2^31. Add server-side dimension caps (e.g., max 1920×1080, max 300 frames).
-
DETECTION
Monitor for repeated crashes or OOM errors in TF Serving logs with large image payloads. Alert on process restarts in model-serving pods.
-
HARDENING
Run TF Serving in isolated containers with resource limits and automatic restart policies to minimize blast radius.
-
DEPENDENCY AUDIT
Scan requirements.txt / conda environments across ML repos for pinned tensorflow < 2.11.1.
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-25667?
Any TensorFlow deployment that accepts image or video input from untrusted sources is exploitable without authentication — an attacker can crash the process by sending a crafted frame buffer exceeding 2^31 pixels in total size. Upgrade to TensorFlow 2.12.0 or 2.11.1 immediately; if patching is delayed, validate input dimensions before they reach TF decode operations. No active exploitation reported, but the low-complexity network vector makes this a realistic threat to exposed model-serving endpoints.
Is CVE-2023-25667 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2023-25667, increasing the risk of exploitation.
How to fix CVE-2023-25667?
1. PATCH: Upgrade to TensorFlow ≥2.12.0 or ≥2.11.1. Both branches contain the fix (commit 8dc723f). 2. WORKAROUND: Enforce strict input validation before TF ops — reject images where num_frames × height × width × channels ≥ 2^31. Add server-side dimension caps (e.g., max 1920×1080, max 300 frames). 3. DETECTION: Monitor for repeated crashes or OOM errors in TF Serving logs with large image payloads. Alert on process restarts in model-serving pods. 4. HARDENING: Run TF Serving in isolated containers with resource limits and automatic restart policies to minimize blast radius. 5. DEPENDENCY AUDIT: Scan requirements.txt / conda environments across ML repos for pinned tensorflow < 2.11.1.
What systems are affected by CVE-2023-25667?
This vulnerability affects the following AI/ML architecture patterns: model serving, training pipelines, batch inference, computer vision APIs.
What is the CVSS score for CVE-2023-25667?
CVE-2023-25667 has a CVSS v3.1 base score of 7.5 (HIGH). The EPSS exploitation probability is 0.21%.
Technical Details
NVD Description
TensorFlow is an open source platform for machine learning. Prior to versions 2.12.0 and 2.11.1, integer overflow occurs when `2^31 <= num_frames * height * width * channels < 2^32`, for example Full HD screencast of at least 346 frames. A fix is included in TensorFlow version 2.12.0 and version 2.11.1.
Exploitation Scenario
An adversary targets a computer vision API endpoint that accepts video uploads for activity recognition or content moderation. They craft a minimal animated GIF or multi-frame TIFF where num_frames × height × width × channels evaluates to approximately 2^31, triggering the integer overflow when TensorFlow decodes the frame buffer. The TF process crashes, taking down the inference service. In a Kubernetes deployment without proper readiness probes, the pod restart cycle can be maintained with repeated requests, creating a sustained DoS. No ML expertise is required — just knowledge of the overflow threshold and basic image format manipulation.
Weaknesses (CWE)
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H References
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