CVE-2022-23567: TensorFlow: integer overflow DoS in sparse tensor ops
MEDIUM PoC AVAILABLE CISA: TRACK*This medium-severity flaw lets any authenticated user crash TensorFlow serving infrastructure via malformed sparse tensor inputs, causing OOM or process termination. Patch to TF 2.8.0, 2.7.1, 2.6.3, or 2.5.3 immediately if running shared or multi-tenant ML serving. No data exfiltration risk, but availability of ML pipelines is the exposure.
What is the risk?
Medium risk in isolation, elevated in shared ML platform contexts. CVSS 6.5 reflects low-complexity network exploitation requiring only authenticated access. The DoS-only impact limits severity, but organizations running internal ML-as-a-service platforms or multi-tenant TensorFlow endpoints face meaningful availability risk from insider threats or compromised credentials. Not actively exploited and not in CISA KEV.
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 to TensorFlow 2.8.0, or backport versions 2.7.1, 2.6.3, or 2.5.3.
-
Containment: Apply container memory limits (--memory flag in Docker) to bound OOM blast radius and prevent host-level impact.
-
Access control: Restrict model inference endpoints to trusted identities; avoid exposing raw TF ops to untrusted users.
-
Detection: Monitor for repeated process crashes or anomalous memory spikes in TF serving pods. Alert on OOM-kills in ML serving namespaces.
-
Workaround (if patching delayed): Validate input tensor shapes and dimensions at the API gateway layer before forwarding to TF.
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-2022-23567?
This medium-severity flaw lets any authenticated user crash TensorFlow serving infrastructure via malformed sparse tensor inputs, causing OOM or process termination. Patch to TF 2.8.0, 2.7.1, 2.6.3, or 2.5.3 immediately if running shared or multi-tenant ML serving. No data exfiltration risk, but availability of ML pipelines is the exposure.
Is CVE-2022-23567 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2022-23567, increasing the risk of exploitation.
How to fix CVE-2022-23567?
1. Patch: Upgrade to TensorFlow 2.8.0, or backport versions 2.7.1, 2.6.3, or 2.5.3. 2. Containment: Apply container memory limits (--memory flag in Docker) to bound OOM blast radius and prevent host-level impact. 3. Access control: Restrict model inference endpoints to trusted identities; avoid exposing raw TF ops to untrusted users. 4. Detection: Monitor for repeated process crashes or anomalous memory spikes in TF serving pods. Alert on OOM-kills in ML serving namespaces. 5. Workaround (if patching delayed): Validate input tensor shapes and dimensions at the API gateway layer before forwarding to TF.
What systems are affected by CVE-2022-23567?
This vulnerability affects the following AI/ML architecture patterns: model serving, training pipelines, shared ML platforms, batch inference.
What is the CVSS score for CVE-2022-23567?
CVE-2022-23567 has a CVSS v3.1 base score of 6.5 (MEDIUM). The EPSS exploitation probability is 1.08%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0029 Denial of AI Service AML.T0034 Cost Harvesting AML.T0049 Exploit Public-Facing Application Compliance Controls Affected
What are the technical details?
Original Advisory
Tensorflow is an Open Source Machine Learning Framework. The implementations of `Sparse*Cwise*` ops are vulnerable to integer overflows. These can be used to trigger large allocations (so, OOM based denial of service) or `CHECK`-fails when building new `TensorShape` objects (so, assert failures 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 insider or attacker with valid API credentials to a shared TensorFlow Model Server submits a crafted inference request containing sparse tensor inputs with pathological dimension values designed to trigger integer overflow in Sparse*Cwise* kernel allocation. The server allocates an enormous TensorShape or exhausts memory, crashing the process. In a Kubernetes-based ML platform, this forces a pod restart, disrupting all concurrent inference requests. The attacker repeats this in a loop to maintain denial of service. No privileged access or ML expertise required beyond knowing the target operation accepts sparse inputs.
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 References
- github.com/tensorflow/tensorflow/blob/5100e359aef5c8021f2e71c7b986420b85ce7b3d/tensorflow/core/kernels/sparse_dense_binary_op_shared.cc Exploit 3rd Party
- github.com/tensorflow/tensorflow/blob/master/tensorflow/security/advisory/tfsa-2021-198.md Patch 3rd Party
- github.com/tensorflow/tensorflow/commit/1b54cadd19391b60b6fcccd8d076426f7221d5e8 Patch 3rd Party
- github.com/tensorflow/tensorflow/commit/e952a89b7026b98fe8cbe626514a93ed68b7c510 Patch 3rd Party
- github.com/tensorflow/tensorflow/security/advisories/GHSA-rrx2-r989-2c43 Patch 3rd Party
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