NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
🐍
🐍 PyPI
Not in CISA KEV
MEDIUM severity

Tensorflow vulnerable to Out-of-Bounds ReadGHSA-8w5g-3wcv-9g2j

MEDIUMFix: tensorflow/tensorflow@b389f5c

GHSA-8w5g-3wcv-9g2j is a medium-severity (CVSS 6.8) Out-of-bounds Read vulnerability in tensorflow. 1 public exploit or proof-of-concept reference is indexed, so weaponization risk is real. A fix is available for tensorflow — see the affected versions and patch details below.

Also known asBIT-tensorflow-2022-41880CVE-2022-41880PYSEC-2026-3140PYSEC-2026-3298PYSEC-2026-971
Published
Updated
Affected
9 pkgs
Patched
9 / 9
Exploits
1 known
Exploitation data as of Nov 4, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

Proof-of-concept exploit code exists

  • CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.

Exploitation and automatability from CISA’s SSVC triage for GHSA-8w5g-3wcv-9g2j.

EPSS Exploitation Probability

via FIRST.org ↗
0.4%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs37th percentile — riskier than 37% of all scored CVEsHighest risk
0.00%0.31%0.62%0.93%0.2%0.4%Jun 26Sep 26Nov 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

Real-World Exposure

9 pkgs affected
🐍tensorflow🐍tensorflow-cpu🐍tensorflow-gpu🐍tensorflow🐍tensorflow-cpu🐍tensorflow-gpu🐍tensorflow🐍tensorflow-cpu+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

When the BaseCandidateSamplerOp function receives a value in true_classes larger than range_max, a heap oob vuln occurs.

tf.raw_ops.ThreadUnsafeUnigramCandidateSampler(
    true_classes=[[0x100000,1]],
    num_true = 2,
    num_sampled = 2,
    unique = False,
    range_max = 2,
    seed = 2,
    seed2 = 2)

Patches

We have patched the issue in GitHub commit b389f5c944cadfdfe599b3f1e4026e036f30d2d4.

The fix will be included in TensorFlow 2.11. We will also cherrypick this commit on TensorFlow 2.10.1, 2.9.3, and TensorFlow 2.8.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 Yu Tian of Qihoo 360 AIVul Team.

Affected Packages

9 total 9 fixed
EcosystemPackageVulnerable rangeFix
🐍PyPItensorflow≥ 2.10.0&&< 2.10.12.10.1pip install --upgrade 'tensorflow==2.10.1'
🐍PyPItensorflow-cpu≥ 2.10.0&&< 2.10.12.10.1pip install --upgrade 'tensorflow-cpu==2.10.1'
🐍PyPItensorflow-gpu≥ 2.10.0&&< 2.10.12.10.1pip install --upgrade 'tensorflow-gpu==2.10.1'
🐍PyPItensorflowall versions2.8.4pip install --upgrade 'tensorflow==2.8.4'
🐍PyPItensorflow-cpuall versions2.8.4pip install --upgrade 'tensorflow-cpu==2.8.4'
🐍PyPItensorflow-gpuall versions2.8.4pip install --upgrade 'tensorflow-gpu==2.8.4'

Affected Products

1 product · 3 configurations
Application
tensorflowgoogle
≥ 2.9.0 && < 2.9.3
1 version
2.10.0
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.10.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-8w5g-3wcv-9g2j is resolved across your whole dependency graph.

  3. Workarounds

    Constrain what reaches the vulnerable code: limit the size and shape of untrusted input, isolate the affected component in a sandboxed or least-privileged process, and enable the platform's memory-safety mitigations (ASLR, stack protector, hardened allocator) so an out-of-bounds access is more likely to fail closed than to be exploitable.

Frequently Asked Questions

### Impact When the [`BaseCandidateSamplerOp`](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/kernels/candidate_sampler_ops.cc) function receives a value in `true_classes` larger than `range_max`, a heap oob vuln occurs. ```python tf.raw_ops.ThreadUnsafeUnigramCandidateSampler( true_classes=[[0x100000,1]], num_true = 2, num_sampled = 2, unique = False, range_max = 2, seed = 2, seed2 = 2) ``` ### Patches We have patched the issue in GitHub commit [b389f5c944cadfdfe599b3f1e4026e036f30d2d4](https://github.com/tensorflow/tensorflow/commit/b389f5c
O3 Security · Impact-Aware SCA

Is GHSA-8w5g-3wcv-9g2j in your dependencies?

Find it across PyPI, including transitive dependencies.

Tensorflow vulnerable to Out-of-Bounds Read (Medium 6.8)