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

GHSA-gv26-jpj9-c8gq tensorflow

MEDIUMFix: tensorflow/tensorflow@ba6822b

GHSA-gv26-jpj9-c8gq is a medium-severity (CVSS 5.3) CWE-754 vulnerability in tensorflow. 1 public exploit reference exists, so weaponization risk is real. A fix is available for tensorflow — see the affected versions and patch details below.

Incomplete validation in `SparseSparseMinimum`

Also known asBIT-tensorflow-2021-29607CVE-2021-29607PYSEC-2021-244PYSEC-2021-535PYSEC-2021-733
Published
Mar 18, 2022
Updated
Jul 8, 2026
Affected
12 pkgs
Patched
12 / 12
Exploits
1 known
Exploitation data as of Sep 18, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
0.2%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs15th percentile — riskier than 15% of all scored CVEsHighest risk

EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.

How urgent is this, really

GHSA-gv26-jpj9-c8gq plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE doesn't sit, though severity or exploitability alone can still warrant action.

Where this sits among everything scored

Of 376,715 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.

Real-World Exposure

12 pkgs affected
🐍tensorflow🐍tensorflow🐍tensorflow🐍tensorflow🐍tensorflow-cpu🐍tensorflow-cpu🐍tensorflow-cpu🐍tensorflow-cpu+4 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

Incomplete validation in SparseAdd results in allowing attackers to exploit undefined behavior (dereferencing null pointers) as well as write outside of bounds of heap allocated data:

import tensorflow as tf

a_indices = tf.ones([45, 92], dtype=tf.int64)
a_values = tf.ones([45], dtype=tf.int64)
a_shape = tf.ones([1], dtype=tf.int64)
b_indices = tf.ones([1, 1], dtype=tf.int64)
b_values = tf.ones([1], dtype=tf.int64)
b_shape = tf.ones([1], dtype=tf.int64)
                    
tf.raw_ops.SparseSparseMinimum(a_indices=a_indices,
    a_values=a_values,
    a_shape=a_shape,
    b_indices=b_indices,
    b_values=b_values,
    b_shape=b_shape)

The implementation has a large set of validation for the two sparse tensor inputs (6 tensors in total), but does not validate that the tensors are not empty or that the second dimension of *_indices matches the size of corresponding *_shape. This allows attackers to send tensor triples that represent invalid sparse tensors to abuse code assumptions that are not protected by validation.

Patches

We have patched the issue in GitHub commit ba6822bd7b7324ba201a28b2f278c29a98edbef2 followed by GitHub commit f6fde895ef9c77d848061c0517f19d0ec2682f3a.

The fix will be included in TensorFlow 2.5.0. We will also cherrypick this commit on TensorFlow 2.4.2, TensorFlow 2.3.3, TensorFlow 2.2.3 and TensorFlow 2.1.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 Ying Wang and Yakun Zhang of Baidu X-Team.

Affected Packages

12 total 12 fixed
EcosystemPackageVulnerable rangeFix
🐍PyPItensorflowall versions2.1.4pip install --upgrade 'tensorflow==2.1.4'
🐍PyPItensorflow2.2.0&&< 2.2.32.2.3pip install --upgrade 'tensorflow==2.2.3'
🐍PyPItensorflow2.3.0&&< 2.3.32.3.3pip install --upgrade 'tensorflow==2.3.3'
🐍PyPItensorflow2.4.0&&< 2.4.22.4.2pip install --upgrade 'tensorflow==2.4.2'
🐍PyPItensorflow-cpuall versions2.1.4pip install --upgrade 'tensorflow-cpu==2.1.4'
🐍PyPItensorflow-cpu2.2.0&&< 2.2.32.2.3pip install --upgrade 'tensorflow-cpu==2.2.3'
Exploits & PoCs
1

Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.

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, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update tensorflow to 2.1.4 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-gv26-jpj9-c8gq 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 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like GHSA-gv26-jpj9-c8gq can be triaged on real exposure rather than presence alone.

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

Frequently Asked Questions

### Impact Incomplete validation in `SparseAdd` results in allowing attackers to exploit undefined behavior (dereferencing null pointers) as well as write outside of bounds of heap allocated data: ```python import tensorflow as tf a_indices = tf.ones([45, 92], dtype=tf.int64) a_values = tf.ones([45], dtype=tf.int64) a_shape = tf.ones([1], dtype=tf.int64) b_indices = tf.ones([1, 1], dtype=tf.int64) b_values = tf.ones([1], dtype=tf.int64) b_shape = tf.ones([1], dtype=tf.int64) tf.raw_ops.SparseSparseMinimum(a_indices=a_indices, a_values=a_values, a_shape=a_shape,
O3 Security · Impact-Aware SCA

Is GHSA-gv26-jpj9-c8gq in your dependencies?

O3 Security finds GHSA-gv26-jpj9-c8gq across PyPI dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.

GHSA-gv26-jpj9-c8gq: tensorflow | O3 Security