CVE-2022-21739: TensorFlow: QuantizedMaxPool null ptr deref causes DoS
MEDIUM PoC AVAILABLEA null pointer dereference in TensorFlow's QuantizedMaxPool op allows any authenticated network user to crash the inference service with a crafted input. Impact is pure availability—no data exposure or code execution. Patch immediately to TF 2.8.0, 2.7.1, 2.6.3, or 2.5.3; any externally-accessible TF serving endpoint is at risk.
What is the risk?
Medium risk. CVSS 6.5 with network attack vector, low complexity, and low privileges makes this trivially exploitable against exposed endpoints. Pure availability impact limits blast radius, but repeated exploitation constitutes sustained denial-of-service against production inference infrastructure. Not in CISA KEV and no evidence of active exploitation in the wild.
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-
Upgrade to TensorFlow 2.8.0 (backport commits to 2.7.1, 2.6.3, or 2.5.3 if version pinning is required).
-
Audit all inference endpoints that expose quantized model operations to untrusted inputs.
-
Implement input validation and tensor shape/type checking before passing to quantized ops.
-
Monitor inference service crash rates and automatic restarts as DoS indicators.
-
Apply network segmentation to restrict access to TF serving endpoints to authorized clients only.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2022-21739?
A null pointer dereference in TensorFlow's QuantizedMaxPool op allows any authenticated network user to crash the inference service with a crafted input. Impact is pure availability—no data exposure or code execution. Patch immediately to TF 2.8.0, 2.7.1, 2.6.3, or 2.5.3; any externally-accessible TF serving endpoint is at risk.
Is CVE-2022-21739 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2022-21739, increasing the risk of exploitation.
How to fix CVE-2022-21739?
1. Upgrade to TensorFlow 2.8.0 (backport commits to 2.7.1, 2.6.3, or 2.5.3 if version pinning is required). 2. Audit all inference endpoints that expose quantized model operations to untrusted inputs. 3. Implement input validation and tensor shape/type checking before passing to quantized ops. 4. Monitor inference service crash rates and automatic restarts as DoS indicators. 5. Apply network segmentation to restrict access to TF serving endpoints to authorized clients only.
What systems are affected by CVE-2022-21739?
This vulnerability affects the following AI/ML architecture patterns: model serving, inference pipelines, edge deployment, training pipelines.
What is the CVSS score for CVE-2022-21739?
CVE-2022-21739 has a CVSS v3.1 base score of 6.5 (MEDIUM). The EPSS exploitation probability is 0.77%.
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 Machine Learning Framework. The implementation of `QuantizedMaxPool` has an undefined behavior where user controlled inputs can trigger a reference binding to null pointer. 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 access to a TensorFlow serving endpoint submits a crafted inference request designed to trigger QuantizedMaxPool with a null reference binding. The process crashes immediately, causing service downtime. In automated pipelines—real-time fraud detection, computer vision inference, recommendation systems—repeated exploitation produces sustained outage with minimal attacker effort and no special tooling required.
Weaknesses (CWE)
CWE-476 — NULL Pointer Dereference: The product dereferences a pointer that it expects to be valid but is NULL.
- [Implementation] For any pointers that could have been modified or provided from a function that can return NULL, check the pointer for NULL before use. When working with a multithreaded or otherwise asynchronous environment, ensure that proper locking APIs are used to lock before the check, and unlock when it has finished [REF-1484].
- [Requirements] Select a programming language that is not susceptible to these issues.
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/quantized_pooling_ops.cc Exploit 3rd Party
- github.com/tensorflow/tensorflow/commit/53b0dd6dc5957652f35964af16b892ec9af4a559 Patch 3rd Party
- github.com/tensorflow/tensorflow/security/advisories/GHSA-3mw4-6rj6-74g5 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