CVE-2022-35985: TensorFlow: DoS via malformed LRNGrad tensor input

HIGH PoC AVAILABLE
Published September 16, 2022
CISO Take

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.

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
195.0K OpenSSF 7.2 3.7K dependents Pushed 6d ago 4% patched ~1372d to patch Full package profile →

Do you use tensorflow? You're affected.

Severity & Risk

CVSS 3.1
7.5 / 10
EPSS
0.1%
chance of exploitation in 30 days
Higher than 20% of all CVEs
Exploitation Status
Exploit Available
Exploitation: MEDIUM
Sophistication
Trivial
Exploitation Confidence
medium
Public PoC indexed (trickest/cve)
Composite signal derived from CISA KEV, CISA SSVC, EPSS, trickest/cve, and Nuclei templates.

Attack Surface

AV AC PR UI S C I A
AV Network
AC Low
PR None
UI None
S Unchanged
C None
I None
A High

Recommended Action

5 steps
  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.

CISA SSVC Assessment

Decision Track
Exploitation none
Automatable No
Technical Impact partial

Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.

Classification

Compliance Impact

This CVE is relevant to:

EU AI Act
Article 17 - Quality Management System Article 9 - Risk Management System
ISO 42001
8.2 - AI Risk Assessment
NIST AI RMF
MANAGE 2.2 - Mechanisms to sustain the value of deployed AI systems

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

Timeline

Published
September 16, 2022
Last Modified
November 21, 2024
First Seen
September 16, 2022

Related Vulnerabilities