CVE-2022-23557: TensorFlow TFLite: DoS via divide-by-zero in BiasAndClamp

MEDIUM PoC AVAILABLE CISA: TRACK*
Published February 4, 2022
CISO Take

Any TFLite inference endpoint that accepts externally-supplied model files is vulnerable to a remotely-triggered crash. An authenticated attacker (low privilege) can send a crafted TFLite model with zero bias_size to halt the inference service. Patch immediately to TF 2.8.0, 2.7.1, 2.6.3, or 2.5.3, and block untrusted model uploads at the perimeter.

What is the risk?

Medium severity but operationally impactful for production AI services. CVSS 6.5 with network-accessible, low-complexity exploitation requiring only low privileges — no user interaction needed. The impact is purely availability (no data exfiltration or code execution), but a crash loop on an inference server can halt business-critical AI pipelines. Edge/mobile TFLite deployments are less exposed if model files are static. Risk elevates significantly for any model-as-a-service or platform accepting user-submitted TFLite models.

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
6.5 / 10
EPSS
0.7%
chance of exploitation in 30 days
Higher than 50% of all CVEs
Exploitation Status
Exploit Available
Exploitation: MEDIUM
Sophistication
Moderate
Exploitation Confidence
medium
CISA SSVC: Public PoC
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 Low
UI None
S Unchanged
C None
I None
A High

What should I do?

5 steps
  1. PATCH

    Upgrade to TensorFlow 2.8.0; or apply cherrypicks to 2.7.1, 2.6.3, or 2.5.3. Commit 8c6f391a2282684a25cbfec7687bd5d35261a209 contains the fix.

  2. VALIDATE INPUT

    If upgrading is not immediately feasible, reject TFLite model uploads from untrusted sources at API gateway level.

  3. SIGN MODELS

    Implement model artifact signing — only execute models with validated provenance.

  4. ISOLATE INFERENCE

    Run TFLite inference in sandboxed processes; a crash should not cascade to the serving layer.

  5. MONITOR

    Alert on repeated inference service restarts or abnormal process exits, which may indicate exploitation attempts.

What does CISA's SSVC say?

Decision Track*
Exploitation poc
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 9 - Risk management system for high-risk AI
ISO 42001
6.1.2 - AI risk assessment
NIST AI RMF
MANAGE 2.2 - Mechanisms to sustain AI system availability
OWASP LLM Top 10
LLM10 - Model Theft / Unbounded Consumption

Frequently Asked Questions

What is CVE-2022-23557?

Any TFLite inference endpoint that accepts externally-supplied model files is vulnerable to a remotely-triggered crash. An authenticated attacker (low privilege) can send a crafted TFLite model with zero bias_size to halt the inference service. Patch immediately to TF 2.8.0, 2.7.1, 2.6.3, or 2.5.3, and block untrusted model uploads at the perimeter.

Is CVE-2022-23557 actively exploited?

Proof-of-concept exploit code is publicly available for CVE-2022-23557, increasing the risk of exploitation.

How to fix CVE-2022-23557?

1. PATCH: Upgrade to TensorFlow 2.8.0; or apply cherrypicks to 2.7.1, 2.6.3, or 2.5.3. Commit 8c6f391a2282684a25cbfec7687bd5d35261a209 contains the fix. 2. VALIDATE INPUT: If upgrading is not immediately feasible, reject TFLite model uploads from untrusted sources at API gateway level. 3. SIGN MODELS: Implement model artifact signing — only execute models with validated provenance. 4. ISOLATE INFERENCE: Run TFLite inference in sandboxed processes; a crash should not cascade to the serving layer. 5. MONITOR: Alert on repeated inference service restarts or abnormal process exits, which may indicate exploitation attempts.

What systems are affected by CVE-2022-23557?

This vulnerability affects the following AI/ML architecture patterns: model serving, inference pipelines, edge AI deployments, MLOps platforms.

What is the CVSS score for CVE-2022-23557?

CVE-2022-23557 has a CVSS v3.1 base score of 6.5 (MEDIUM). The EPSS exploitation probability is 0.74%.

What is the AI security impact?

Affected AI Architectures

model servinginference pipelinesedge AI deploymentsMLOps platforms

MITRE ATLAS Techniques

AML.T0011.000 Unsafe AI Artifacts
AML.T0029 Denial of AI Service
AML.T0043.003 Manual Modification
AML.T0049 Exploit Public-Facing Application

Compliance Controls Affected

EU AI Act: Article 9
ISO 42001: 6.1.2
NIST AI RMF: MANAGE 2.2
OWASP LLM Top 10: LLM10

What are the technical details?

Original Advisory

Tensorflow is an Open Source Machine Learning Framework. An attacker can craft a TFLite model that would trigger a division by zero in `BiasAndClamp` implementation. There is no check that the `bias_size` is non zero. 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

Attacker with a low-privilege account on a TFLite model-serving platform (e.g., an MLOps API, a federated learning hub, or a cloud inference endpoint) crafts a TFLite flatbuffer where a Conv2D or similar layer references a BiasAndClamp operation with bias_size set to zero. The attacker submits this model via the inference or upload API. When the server attempts to run inference, BiasAndClamp performs a division by zero, triggering an unhandled exception or SIGFPE that crashes the inference worker. With no rate limiting, the attacker can sustain a denial-of-service loop by repeatedly re-submitting the crafted model, effectively making the inference service unavailable.

Weaknesses (CWE)

CWE-369 — Divide By Zero: The product divides a value by zero.

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

Timeline

Published
February 4, 2022
Last Modified
November 21, 2024
First Seen
February 4, 2022

Related Vulnerabilities