Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐍
🐍 PyPI
Not in CISA KEV
HIGH severity

GHSA-wf5p-c75w-w3wh

HIGHFix: tensorflow/tensorflow@d6b57f4

GHSA-wf5p-c75w-w3wh is a high-severity (CVSS 7.8) NULL Pointer Dereference vulnerability in tensorflow. O3 Security confirms whether GHSA-wf5p-c75w-w3wh is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.

Null pointer dereference in TFLite MLIR optimizations

Also known asBIT-tensorflow-2021-37689CVE-2021-37689PYSEC-2021-311PYSEC-2021-602PYSEC-2021-800
Published
Aug 25, 2021
Updated
Mar 13, 2026
Affected
9 pkgs
Patched
9 / 9
Exploits
None indexed
Exploitation data as of Mar 13, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Real-World Exposure

9 pkgs affected
🐍tensorflow🐍tensorflow🐍tensorflow🐍tensorflow-cpu🐍tensorflow-cpu🐍tensorflow-cpu🐍tensorflow-gpu🐍tensorflow-gpu+1 more

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.

Description

Impact

An attacker can craft a TFLite model that would trigger a null pointer dereference, which would result in a crash and denial of service:

This is caused by the MLIR optimization of L2NormalizeReduceAxis operator. The implementation unconditionally dereferences a pointer to an iterator to a vector without checking that the vector has elements:

bool L2NormalizeReduceAxis(Value sq_op, DenseElementsAttr axis) {
  if (sq_op.getType().cast<ShapedType>().getRank() - 1 ==
          *axis.getValues<int>().begin() ||
      *axis.getValues<int>().begin() == -1) {
      // ...
  }
  // ...
}

Patches

We have patched the issue in GitHub commit d6b57f461b39fd1aa8c1b870f1b974aac3554955.

The fix will be included in TensorFlow 2.6.0. We will also cherrypick this commit on TensorFlow 2.5.1, TensorFlow 2.4.3, and TensorFlow 2.3.4, as these are also affected and still in supported range.

For more information

Please consult our security guide for more information regarding the security model and how to contact us with issues and questions.

Attribution

This vulnerability has been reported by Yakun Zhang of Baidu Security.

Affected Packages

9 total 9 fixed
EcosystemPackageVulnerable rangeFix
🐍PyPItensorflowall versions2.3.4
🐍PyPItensorflow2.4.0&&< 2.4.32.4.3
🐍PyPItensorflow2.5.0&&< 2.5.12.5.1
🐍PyPItensorflow-cpuall versions2.3.4
🐍PyPItensorflow-cpu2.4.0&&< 2.4.32.4.3
🐍PyPItensorflow-cpu2.5.0&&< 2.5.12.5.1

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for tensorflow. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update tensorflow to 2.3.4 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-wf5p-c75w-w3wh is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether GHSA-wf5p-c75w-w3wh is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to GHSA-wf5p-c75w-w3wh. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

### Impact An attacker can craft a TFLite model that would trigger a null pointer dereference, which would result in a crash and denial of service: This is caused by the MLIR optimization of `L2NormalizeReduceAxis` operator. The [implementation](https://github.com/tensorflow/tensorflow/blob/149562d49faa709ea80df1d99fc41d005b81082a/tensorflow/compiler/mlir/lite/transforms/optimize.cc#L67-L70) unconditionally dereferences a pointer to an iterator to a vector without checking that the vector has elements: ```cc bool L2NormalizeReduceAxis(Value sq_op, DenseElementsAttr axis) { if (sq_op.getTyp
O3 Security · Impact-Aware SCA

Is GHSA-wf5p-c75w-w3wh in your dependencies?

O3 detects GHSA-wf5p-c75w-w3wh across PyPI dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.