CVE-2022-23568: TensorFlow: integer overflow DoS in sparse tensor ops

MEDIUM PoC AVAILABLE CISA: TRACK*
Published February 3, 2022
CISO Take

Any TensorFlow deployment on versions 2.5.x–2.7.x that processes sparse tensor inputs from authenticated users is vulnerable to remote crash via integer overflow in AddManySparseToTensorsMap. Patch immediately to TF 2.8.0, 2.7.1, 2.6.3, or 2.5.3. No effective workaround exists beyond restricting access to affected inference endpoints.

What is the risk?

Medium risk in practice despite easy exploitability. CVSS 6.5: network-reachable, low complexity, only requires low-privilege credentials—any authenticated user can trigger the crash. Impact is strictly availability (no data exfiltration or code execution). Risk escalates for public-facing model serving APIs where user-submitted sparse tensors are processed without upstream input sanitization, and for deployments lacking process auto-restart.

What systems are affected?

Package Ecosystem Vulnerable Range Patched
TensorFlow pip No patch
195.8K OpenSSF 7.1 3.7K dependents Pushed 2d ago 4% patched ~1372d to patch Full package profile →

Do you use TensorFlow? You're affected.

How severe is it?

CVSS 3.1
6.5 / 10
EPSS
0.8%
chance of exploitation in 30 days
Higher than 51% of all CVEs
Exploitation Status
Exploit Available
Exploitation: MEDIUM
Sophistication
Moderate
Exploitation Confidence
medium
CISA SSVC: Public PoC
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 Network
AC Low
PR Low
UI None
S Unchanged
C None
I None
A High

What should I do?

5 steps
  1. Upgrade to TF 2.8.0, 2.7.1, 2.6.3, or 2.5.3 (patches: commits a68f680 and b51b82f on the TF repo).

  2. If immediate patching is blocked, add input validation middleware to reject SparseTensor inputs with dimension values exceeding expected bounds before they reach TF kernels.

  3. Configure process supervisors (systemd RestartOnFailure, k8s liveness probes) to auto-restart TF serving processes on crash.

  4. Monitor for unexpected TF process exits and spike in 5xx errors from inference endpoints as detection signals.

  5. Audit all API endpoints that accept sparse tensor inputs from external or low-trust callers and apply authentication + rate limiting.

What does CISA's SSVC say?

Decision Track*
Exploitation poc
Automatable No
Technical Impact partial

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
Article 15 - Accuracy, robustness and cybersecurity
ISO 42001
A.9.3 - AI system availability and resilience
NIST AI RMF
MANAGE-2.2 - AI risk treatments including response and recovery
OWASP LLM Top 10
LLM10:2025 - Unbounded Consumption

Frequently Asked Questions

What is CVE-2022-23568?

Any TensorFlow deployment on versions 2.5.x–2.7.x that processes sparse tensor inputs from authenticated users is vulnerable to remote crash via integer overflow in AddManySparseToTensorsMap. Patch immediately to TF 2.8.0, 2.7.1, 2.6.3, or 2.5.3. No effective workaround exists beyond restricting access to affected inference endpoints.

Is CVE-2022-23568 actively exploited?

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

How to fix CVE-2022-23568?

1. Upgrade to TF 2.8.0, 2.7.1, 2.6.3, or 2.5.3 (patches: commits a68f680 and b51b82f on the TF repo). 2. If immediate patching is blocked, add input validation middleware to reject SparseTensor inputs with dimension values exceeding expected bounds before they reach TF kernels. 3. Configure process supervisors (systemd RestartOnFailure, k8s liveness probes) to auto-restart TF serving processes on crash. 4. Monitor for unexpected TF process exits and spike in 5xx errors from inference endpoints as detection signals. 5. Audit all API endpoints that accept sparse tensor inputs from external or low-trust callers and apply authentication + rate limiting.

What systems are affected by CVE-2022-23568?

This vulnerability affects the following AI/ML architecture patterns: model serving, training pipelines, inference.

What is the CVSS score for CVE-2022-23568?

CVE-2022-23568 has a CVSS v3.1 base score of 6.5 (MEDIUM). The EPSS exploitation probability is 0.79%.

What is the AI security impact?

Affected AI Architectures

model servingtraining pipelinesinference

MITRE ATLAS Techniques

AML.T0029 Denial of AI Service
AML.T0034 Cost Harvesting
AML.T0049 Exploit Public-Facing Application

Compliance Controls Affected

EU AI Act: Article 15
ISO 42001: A.9.3
NIST AI RMF: MANAGE-2.2
OWASP LLM Top 10: LLM10:2025

What are the technical details?

Original Advisory

Tensorflow is an Open Source Machine Learning Framework. The implementation of `AddManySparseToTensorsMap` is vulnerable to an integer overflow which results in a `CHECK`-fail when building new `TensorShape` objects (so, an assert failure based denial of service). We are missing some validation on the shapes of the input tensors as well as directly constructing a large `TensorShape` with user-provided dimensions. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.

Exploitation Scenario

An attacker with a valid low-privilege API credential to a TF Serving endpoint submits a crafted inference request containing a SparseTensor with artificially inflated shape dimensions. When AddManySparseToTensorsMap processes the input, the integer overflow during TensorShape construction triggers a CHECK-fail assertion, immediately crashing the TF serving process. In a Kubernetes deployment without liveness probes, this takes the inference pod offline. By automating a stream of such requests from a single authenticated session, the attacker achieves persistent DoS against the model serving infrastructure with minimal cost and zero specialized ML expertise beyond knowing the target framework.

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:L/UI:N/S:U/C:N/I:N/A:H

Timeline

Published
February 3, 2022
Last Modified
May 5, 2025
First Seen
February 3, 2022

Related Vulnerabilities