CVE-2022-35985: TensorFlow: DoS via malformed LRNGrad tensor input
HIGH PoC AVAILABLEA network-accessible denial-of-service in TensorFlow's LRNGrad operation allows any unauthenticated attacker to crash inference servers by sending a non-4D tensor—no exploit tooling required. Patch to TF 2.10.0, 2.9.1, 2.8.1, or 2.7.2 immediately if TensorFlow Serving endpoints are reachable from untrusted networks. In the interim, place inference APIs behind authentication or restrict network access.
Risk Assessment
CVSS 7.5 HIGH with zero authentication and no user interaction makes this trivially weaponizable against exposed inference infrastructure. Confidentiality and integrity are unaffected, but availability loss in a production ML serving cluster can cascade into dependent AI-powered services going dark. Not in CISA KEV and no known active exploitation, which moderates urgency slightly—but the patch is mature and the exposure window is unacceptable if endpoints are public-facing.
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-
Patch: Upgrade to TensorFlow 2.10.0, or apply cherry-picks to 2.9.1, 2.8.1, or 2.7.2 (commit bd90b3e).
-
Input validation: enforce 4-D tensor shape constraints at API boundaries before ops reach LRNGrad—reject malformed requests with HTTP 400 rather than propagating to the TF runtime.
-
Network hardening: place TensorFlow Serving behind an authenticated reverse proxy; never expose raw gRPC/REST prediction endpoints to the internet without auth.
-
Detection: alert on abnormal TF process crashes or CHECK fail log signatures (
tensorflow::internal::LogMessageFatal). -
Consider process supervision (systemd restart policies) to restore availability quickly if crash occurs.
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-35985?
A network-accessible denial-of-service in TensorFlow's LRNGrad operation allows any unauthenticated attacker to crash inference servers by sending a non-4D tensor—no exploit tooling required. Patch to TF 2.10.0, 2.9.1, 2.8.1, or 2.7.2 immediately if TensorFlow Serving endpoints are reachable from untrusted networks. In the interim, place inference APIs behind authentication or restrict network access.
Is CVE-2022-35985 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2022-35985, increasing the risk of exploitation.
How to fix CVE-2022-35985?
1. Patch: Upgrade to TensorFlow 2.10.0, or apply cherry-picks to 2.9.1, 2.8.1, or 2.7.2 (commit bd90b3e). 2. Input validation: enforce 4-D tensor shape constraints at API boundaries before ops reach LRNGrad—reject malformed requests with HTTP 400 rather than propagating to the TF runtime. 3. Network hardening: place TensorFlow Serving behind an authenticated reverse proxy; never expose raw gRPC/REST prediction endpoints to the internet without auth. 4. Detection: alert on abnormal TF process crashes or CHECK fail log signatures (`tensorflow::internal::LogMessageFatal`). 5. Consider process supervision (systemd restart policies) to restore availability quickly if crash occurs.
What systems are affected by CVE-2022-35985?
This vulnerability affects the following AI/ML architecture patterns: model serving, training pipelines, inference APIs.
What is the CVSS score for CVE-2022-35985?
CVE-2022-35985 has a CVSS v3.1 base score of 7.5 (HIGH). The EPSS exploitation probability is 0.06%.
Technical Details
NVD Description
TensorFlow is an open source platform for machine learning. If `LRNGrad` is given an `output_image` input tensor that is not 4-D, it results in a `CHECK` fail that can be used to trigger a denial of service attack. We have patched the issue in GitHub commit bd90b3efab4ec958b228cd7cfe9125be1c0cf255. The fix will be included in TensorFlow 2.10.0. We will also cherrypick this commit on TensorFlow 2.9.1, TensorFlow 2.8.1, and TensorFlow 2.7.2, as these are also affected and still in supported range. There are no known workarounds for this issue.
Exploitation Scenario
An attacker identifies an exposed TensorFlow Serving endpoint (default ports 8500/8501) via Shodan or similar. They craft a gRPC PredictRequest with a deliberately malformed input tensor that is 3-D instead of the expected 4-D shape. The server passes this input to LRNGrad during backpropagation computation, triggers the internal CHECK assertion, and the TF process terminates immediately. Automated looping of this request keeps the service down indefinitely. No AI/ML expertise is required—only knowledge of the expected model signature and the ability to send a gRPC/REST request.
Weaknesses (CWE)
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
AI Threat Alert