CVE-2022-23576: TensorFlow: integer overflow in cost estimator causes DoS
MEDIUM PoC AVAILABLE CISA: TRACK*A network-accessible integer overflow in TensorFlow's Grappler cost estimator allows low-privileged attackers to crash TensorFlow workloads via crafted tensor operations. Patch to TF 2.8.0, 2.7.1, 2.6.3, or 2.5.3 immediately if running older versions. Restrict API access to TensorFlow Serving endpoints to minimize exposure surface.
Risk Assessment
Medium risk in most environments. CVSS 6.5 reflects network accessibility with low privilege requirements, but impact is limited to availability—no data exfiltration or code execution is possible. Risk increases substantially for multi-tenant AI platforms or shared inference infrastructure where untrusted users can submit custom graph operations. Not in CISA KEV and no known active exploitation as of publication.
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-
Upgrade to TensorFlow 2.8.0, 2.7.1, 2.6.3, or 2.5.3—all contain the upstream patch (commit b9bd6cfd).
-
Enforce strict authentication and authorization on all TF Serving and training API endpoints—no unauthenticated tensor submission.
-
Implement input validation at the API gateway layer to reject operations with pathologically large tensor dimensions.
-
Set resource quotas on tensor dimension sizes in multi-tenant environments.
-
Monitor for abnormally large graph submissions or repeated crash/restart cycles as detection signals for exploitation attempts.
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-2022-23576?
A network-accessible integer overflow in TensorFlow's Grappler cost estimator allows low-privileged attackers to crash TensorFlow workloads via crafted tensor operations. Patch to TF 2.8.0, 2.7.1, 2.6.3, or 2.5.3 immediately if running older versions. Restrict API access to TensorFlow Serving endpoints to minimize exposure surface.
Is CVE-2022-23576 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2022-23576, increasing the risk of exploitation.
How to fix CVE-2022-23576?
1. Upgrade to TensorFlow 2.8.0, 2.7.1, 2.6.3, or 2.5.3—all contain the upstream patch (commit b9bd6cfd). 2. Enforce strict authentication and authorization on all TF Serving and training API endpoints—no unauthenticated tensor submission. 3. Implement input validation at the API gateway layer to reject operations with pathologically large tensor dimensions. 4. Set resource quotas on tensor dimension sizes in multi-tenant environments. 5. Monitor for abnormally large graph submissions or repeated crash/restart cycles as detection signals for exploitation attempts.
What systems are affected by CVE-2022-23576?
This vulnerability affects the following AI/ML architecture patterns: training pipelines, model serving, MLOps platforms.
What is the CVSS score for CVE-2022-23576?
CVE-2022-23576 has a CVSS v3.1 base score of 6.5 (MEDIUM). The EPSS exploitation probability is 0.22%.
Technical Details
NVD Description
Tensorflow is an Open Source Machine Learning Framework. The implementation of `OpLevelCostEstimator::CalculateOutputSize` is vulnerable to an integer overflow if an attacker can create an operation which would involve tensors with large enough number of elements. We can have a large enough number of dimensions in `output_shape.dim()` or just a small number of dimensions being large enough to cause an overflow in the multiplication. 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 low-privilege API credentials to a TensorFlow Serving endpoint or shared MLOps platform constructs a computation graph containing operations whose output tensors have very large numbers of dimensions or dimension sizes. When TensorFlow's Grappler optimizer invokes CalculateOutputSize to estimate operation costs, the multiplication of dimension values overflows a 32-bit integer, causing an abort or crash of the TF runtime. In a shared ML training cluster, this is repeatable on demand: the attacker can continuously restart crashed workers, disrupting legitimate training jobs and degrading inference SLAs for all tenants on the platform.
Weaknesses (CWE)
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/a1320ec1eac186da1d03f033109191f715b2b130/tensorflow/core/grappler/costs/op_level_cost_estimator.cc Exploit 3rd Party
- github.com/tensorflow/tensorflow/commit/b9bd6cfd1c50e6807846af9a86f9b83cafc9c8ae Patch 3rd Party
- github.com/tensorflow/tensorflow/security/advisories/GHSA-wm93-f238-7v37 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
AI Threat Alert