CVE-2021-29608Heap OOB and null pointer dereference in `RaggedTensorToTensor`
- 5.3MediumCVSS base score
- 0.23%Exploitation in 30 daysEPSS · top 86% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
Description
TensorFlow is an end-to-end open source platform for machine learning. Due to lack of validation in `tf.raw_ops.RaggedTensorToTensor`, an attacker can exploit an undefined behavior if input arguments are empty. The implementation(https://github.com/tensorflow/tensorflow/blob/656e7673b14acd7835dc778867f84916c6d1cac2/tensorflow/core/kernels/ragged_tensor_to_tensor_op.cc#L356-L360) only checks that one of the tensors is not empty, but does not check for the other ones. There are multiple `DCHECK` validations to prevent heap OOB, but these are no-op in release builds, hence they don't prevent anything. The fix will be included in TensorFlow 2.5.0. We will also cherrypick these commits 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.
Timeline
ID reserved
By GitHub_M
- 45 days later
· 45 days later
Published
- 3 years later
· 3 years later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | Medium5.3 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:H |
| NVDNVD · Modified | 3.1 | High7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
- EPSS (exploitation in 30 days)
- 0.23% · top 86% of all CVEs (17 Nov 2026)
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 5.3.
Affected products
- affected < 2.1.4
- affected >= 2.2.0, < 2.2.3
- affected >= 2.3.0, < 2.3.3
- affected >= 2.4.0, < 2.4.2
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- PyPItensorflowGHSA-rgvq-pcvf-hx75 (opens in a new tab)
- PyPItensorflow-cpuGHSA-rgvq-pcvf-hx75 (opens in a new tab)
- PyPItensorflow-gpuGHSA-rgvq-pcvf-hx75 (opens in a new tab)
References
References4
- https://github.com/tensorflow/tensorflow/security/advisories/GHSA-rgvq-pcvf-hx75 (opens in a new tab)x_refsource_CONFIRMx_transferred
- https://github.com/tensorflow/tensorflow/commit/b761c9b652af2107cfbc33efd19be0ce41daa33e (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/tensorflow/tensorflow/commit/c4d7afb6a5986b04505aca4466ae1951686c80f6 (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/tensorflow/tensorflow/commit/f94ef358bb3e91d517446454edff6535bcfe8e4a (opens in a new tab)x_refsource_MISCx_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2021-0349 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-rgvq-pcvf-hx75 (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2021-29608)Record last updated .