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.

Risk Assessment

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.

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
6.5 / 10
EPSS
0.2%
chance of exploitation in 30 days
Higher than 44% 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, CISA SSVC, EPSS, trickest/cve, and Nuclei templates.

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

Recommended Action

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.

CISA SSVC Assessment

Decision Track*
Exploitation poc
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 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.22%.

Technical Details

NVD Description

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)

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