CVE-2023-25662: TensorFlow: integer overflow in EditDistance causes DoS
HIGHAny TensorFlow deployment exposing inference APIs to untrusted inputs is vulnerable to remote process crash—no authentication required. Upgrade to TensorFlow 2.12.0 or 2.11.1 immediately. Production ML services must patch before deploying; add input shape validation at the API gateway as a short-term compensating control.
What is the risk?
HIGH risk for internet-exposed TensorFlow inference services. CVSS 7.5 with network vector, low complexity, no privileges, and no user interaction makes this trivially exploitable. Impact is purely availability (A:H)—no data exfiltration or code execution path exists. For batch training pipelines isolated from untrusted inputs, risk drops to LOW. Not in CISA KEV, suggesting no confirmed active exploitation at time of publication, but low exploitation barrier warrants priority patching.
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| TensorFlow | pip | — | No patch |
Do you use TensorFlow? You're affected.
How severe is it?
What is the attack surface?
What should I do?
5 steps-
PATCH
Upgrade TensorFlow to 2.12.0 (stable) or 2.11.1 (security branch) immediately.
-
WORKAROUND
Validate and enforce bounds on input tensor shapes and sequence lengths at the API gateway before forwarding to TensorFlow operations.
-
ISOLATION
Run TensorFlow inference workers in isolated containers with automatic restart policies to minimize downtime from triggered crashes.
-
DETECTION
Alert on abnormal TensorFlow process crashes or OOM errors correlated with unusual input sizes or request patterns from specific source IPs.
-
AUDIT
Enumerate all internal services using EditDistance and prioritize patching by exposure level (internet-facing first).
What does CISA's SSVC say?
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:
Frequently Asked Questions
What is CVE-2023-25662?
Any TensorFlow deployment exposing inference APIs to untrusted inputs is vulnerable to remote process crash—no authentication required. Upgrade to TensorFlow 2.12.0 or 2.11.1 immediately. Production ML services must patch before deploying; add input shape validation at the API gateway as a short-term compensating control.
Is CVE-2023-25662 actively exploited?
No confirmed active exploitation of CVE-2023-25662 has been reported, but organizations should still patch proactively.
How to fix CVE-2023-25662?
1. PATCH: Upgrade TensorFlow to 2.12.0 (stable) or 2.11.1 (security branch) immediately. 2. WORKAROUND: Validate and enforce bounds on input tensor shapes and sequence lengths at the API gateway before forwarding to TensorFlow operations. 3. ISOLATION: Run TensorFlow inference workers in isolated containers with automatic restart policies to minimize downtime from triggered crashes. 4. DETECTION: Alert on abnormal TensorFlow process crashes or OOM errors correlated with unusual input sizes or request patterns from specific source IPs. 5. AUDIT: Enumerate all internal services using EditDistance and prioritize patching by exposure level (internet-facing first).
What systems are affected by CVE-2023-25662?
This vulnerability affects the following AI/ML architecture patterns: model serving, training pipelines, ML inference APIs.
What is the CVSS score for CVE-2023-25662?
CVE-2023-25662 has a CVSS v3.1 base score of 7.5 (HIGH). The EPSS exploitation probability is 0.39%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0010.001 AI Software AML.T0029 Denial of AI Service AML.T0049 Exploit Public-Facing Application Compliance Controls Affected
What are the technical details?
Original Advisory
TensorFlow is an open source platform for machine learning. Versions prior to 2.12.0 and 2.11.1 are vulnerable to integer overflow in EditDistance. A fix is included in TensorFlow version 2.12.0 and version 2.11.1.
Exploitation Scenario
An adversary identifies a public-facing ML inference API built on unpatched TensorFlow—for example, a text similarity scoring or speech recognition service. They craft an HTTP POST request containing tensor inputs with values engineered to trigger an integer overflow in the EditDistance computation, causing the TF worker process to crash and return a 500 error. By automating requests at regular intervals, the attacker sustains a persistent DoS condition against production inference endpoints, breaching SLA commitments and disrupting compliance-critical AI applications without needing any credentials or prior access.
Weaknesses (CWE)
CWE-190 — Integer Overflow or Wraparound: The product performs a calculation that can produce an integer overflow or wraparound when the logic assumes that the resulting value will always be larger than the original value. This occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may become a very small or negative number.
- [Requirements] Ensure that all protocols are strictly defined, such that all out-of-bounds behavior can be identified simply, and require strict conformance to the protocol.
- [Requirements] Use a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. If possible, choose a language or compiler that performs automatic bounds checking.
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 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