# CVE-2022-41880: ThreadUnsafeUnigramCandidateSampler Heap out of bounds in Tensorflow

- Priority: **Routine**
- Reason: Not severe (CVSS 6.8, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2022-11-18 · Modified: 2025-04-22
- Aliases: GHSA-8w5g-3wcv-9g2j, BIT-tensorflow-2022-41880, PYSEC-2026-3140, PYSEC-2026-3298, PYSEC-2026-971
- Record: https://cvemate.com/vulnerability/CVE-2022-41880 · JSON: https://cvemate.com/vulnerability/CVE-2022-41880/json

## Description

```text
TensorFlow is an open source platform for machine learning. When the `BaseCandidateSamplerOp` function receives a value in `true_classes` larger than `range_max`, a heap oob read occurs. 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.
```

## Signals

- CVSS: 9.1 critical (v3.1, NVD) CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
- EPSS: 0.562%, percentile 48.157%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 1 (github)

## Affected

- google tensorflow: \< 2.8.4 \| ≥ 2.9.0, \< 2.9.3 \| 2.10.0
- PyPI tensorflow (PyPI): \< 2.8.4 \| ≥ 2.9.0, \< 2.9.3 \| ≥ 2.10.0, \< 2.10.1
- PyPI tensorflow-cpu (PyPI): \< 2.8.4 \| ≥ 2.9.0, \< 2.9.3 \| ≥ 2.10.0, \< 2.10.1
- PyPI tensorflow-gpu (PyPI): \< 2.8.4 \| ≥ 2.9.0, \< 2.9.3 \| ≥ 2.10.0, \< 2.10.1
- tensorflow tensorflow: ≥ 2.10.0, \< 2.10.1 \| ≥ 2.9.0, \< 2.9.3 \| \< 2.8.4

## References

- <https://github.com/tensorflow/tensorflow/security/advisories/GHSA-8w5g-3wcv-9g2j>
- <https://github.com/tensorflow/tensorflow/commit/b389f5c944cadfdfe599b3f1e4026e036f30d2d4>
- <https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/kernels/candidate_sampler_ops.cc>
- <https://nvd.nist.gov/vuln/detail/CVE-2022-41880>
- <https://github.com/tensorflow/tensorflow>
- <https://pypi.org/project/tensorflow>
- <https://github.com/advisories/GHSA-8w5g-3wcv-9g2j>
- <https://pypi.org/project/tensorflow-cpu>
- <https://pypi.org/project/tensorflow-gpu>

---

Data as of 2026-12-05T08:03:26.578Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
