CVE-2021-29512
published low CVSS 3.1 · 2.5Heap buffer overflow in `RaggedBinCount`
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| tensorflow | — | tensorflow>=2.3.0, < 2.3.3 · >= 2.4.0, < 2.4.2 | Affected | Not stated | GitHub_M |
Description
TensorFlow is an end-to-end open source platform for machine learning. If the `splits` argument of `RaggedBincount` does not specify a valid `SparseTensor`(https://www.tensorflow.org/api_docs/python/tf/sparse/SparseTensor), then an attacker can trigger a heap buffer overflow. This will cause a read from outside the bounds of the `splits` tensor buffer in the implementation of the `RaggedBincount` op(https://github.com/tensorflow/tensorflow/blob/8b677d79167799f71c42fd3fa074476e0295413a/tensorflow/core/kernels/bincount_op.cc#L430-L433). Before the `for` loop, `batch_idx` is set to 0. The user controls the `splits` array, making it contain only one element, 0. Thus, the code in the `while` loop would increment `batch_idx` and then try to read `splits(1)`, which is outside of bounds. The fix will be included in TensorFlow 2.5.0. We will also cherrypick this commit on TensorFlow 2.4.2 and TensorFlow 2.3.3, as these are also affected.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 2.5 / 10
- Severity
- low
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| tensorflow | tensorflow | >=2.3.0, < 2.3.3 (affected)>= 2.4.0, < 2.4.2 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-120 CWE-120: Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')
References
2Provider assertions
2GitHub_M · cna
Heap buffer overflow in `RaggedBinCount`
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- 257bd5a1dc5ea7f914512e60a94f607b6565e2ae94f721da56ffd3557e09f3c5
- Ingested
- 23 Sep 2026, 07:53:55 UTC
- Source record
- Official CVE record