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.

What is the risk?

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.

What systems are affected?

Package Ecosystem Vulnerable Range Patched
TensorFlow pip No patch
195.8K OpenSSF 7.1 3.7K dependents Pushed 2d ago 4% patched ~1372d to patch Full package profile →

Do you use TensorFlow? You're affected.

How severe is it?

CVSS 3.1
7.5 / 10
EPSS
0.4%
chance of exploitation in 30 days
Higher than 30% 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, VulnCheck KEV, CISA SSVC, EPSS, Metasploit, Exploit-DB, trickest/cve, Nuclei templates, and inthewild.io exploitation reports.

What is the 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

What should I do?

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.

What does CISA's SSVC say?

Decision Track
Exploitation none
Automatable No
Technical Impact partial

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:

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.38%.

What is the AI security impact?

Affected AI Architectures

model servingtraining pipelinesinference APIs

MITRE ATLAS Techniques

AML.T0029 Denial of AI Service
AML.T0034 Cost Harvesting
AML.T0049 Exploit Public-Facing Application

Compliance Controls Affected

EU AI Act: Article 17, Article 9
ISO 42001: 8.2
NIST AI RMF: MANAGE 2.2

What are the technical details?

Original Advisory

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)

CWE-617 — Reachable Assertion: The product contains an assert() or similar statement that can be triggered by an attacker, which leads to an application exit or other behavior that is more severe than necessary.

  • [Implementation] Make sensitive open/close operation non reachable by directly user-controlled data (e.g. open/close resources)
  • [Implementation] Perform input validation on user data.

Source: MITRE CWE corpus.

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