{"cve":"CVE-2022-29210","nvd":{"published":"2022-05-21T00:15:11.583","modified":"2026-06-17T04:39:49.910","status":"Modified","description":"TensorFlow is an open source platform for machine learning. In version 2.8.0, the `TensorKey` hash function used total estimated `AllocatedBytes()`, which (a) is an estimate per tensor, and (b) is a very poor hash function for constants (e.g. `int32_t`). It also tried to access individual tensor bytes through `tensor.data()` of size `AllocatedBytes()`. This led to ASAN failures because the `AllocatedBytes()` is an estimate of total bytes allocated by a tensor, including any pointed-to constructs (e.g. strings), and does not refer to contiguous bytes in the `.data()` buffer. The discoverers could not use this byte vector anyway because types such as `tstring` include pointers, whereas they needed to hash the string values themselves. This issue is patched in Tensorflow versions 2.9.0 and 2.8.1.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5},"cwes":["CWE-787","CWE-120","CWE-122"],"references":["https://github.com/tensorflow/tensorflow/blob/f3b9bf4c3c0597563b289c0512e98d4ce81f886e/tensorflow/core/framework/tensor_key.h#L53-L64","https://github.com/tensorflow/tensorflow/commit/1b85a28d395dc91f4d22b5f9e1e9a22e92ccecd6","https://github.com/tensorflow/tensorflow/releases/tag/v2.8.1","https://github.com/tensorflow/tensorflow/releases/tag/v2.9.0","https://github.com/tensorflow/tensorflow/security/advisories/GHSA-hc2f-7r5r-r2hg"],"products":["google:tensorflow"],"source":"nvd","synced_at":"2026-10-19T21:31:59.322382750+00:00"},"epss":{"cve":"CVE-2022-29210","score":0.0023,"percentile":0.13891,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-hc2f-7r5r-r2hg","url":"https://osv.dev/vulnerability/GHSA-hc2f-7r5r-r2hg","summary":"Heap buffer overflow due to incorrect hash function in TensorFlow","modified":"2026-07-13T16:42:28.752579130Z","packages":[{"ecosystem":"PyPI","name":"tensorflow","purl":"pkg:pypi/tensorflow","ranges":[">=2.8.0 <2.8.1"],"fixed":["2.8.1"]},{"ecosystem":"PyPI","name":"tensorflow-cpu","purl":"pkg:pypi/tensorflow-cpu","ranges":[">=2.8.0 <2.8.1"],"fixed":["2.8.1"]},{"ecosystem":"PyPI","name":"tensorflow-gpu","purl":"pkg:pypi/tensorflow-gpu","ranges":[">=2.8.0 <2.8.1"],"fixed":["2.8.1"]}]},{"id":"PYSEC-2026-1007","url":"https://osv.dev/vulnerability/PYSEC-2026-1007","summary":"Heap buffer overflow due to incorrect hash function in TensorFlow","modified":"2026-07-13T16:42:28.752579130Z","packages":[{"ecosystem":"PyPI","name":"tensorflow-gpu","purl":"pkg:pypi/tensorflow-gpu","ranges":[">=2.8.0 <2.8.1"],"fixed":["2.8.1"]}]},{"id":"PYSEC-2026-3200","url":"https://osv.dev/vulnerability/PYSEC-2026-3200","summary":"Heap buffer overflow due to incorrect hash function in TensorFlow","modified":"2026-07-13T16:42:28.752579130Z","packages":[{"ecosystem":"PyPI","name":"tensorflow","purl":"pkg:pypi/tensorflow","ranges":[">=2.8.0 <2.8.1"],"fixed":["2.8.1"]}]},{"id":"PYSEC-2026-3339","url":"https://osv.dev/vulnerability/PYSEC-2026-3339","summary":"Heap buffer overflow due to incorrect hash function in TensorFlow","modified":"2026-07-13T16:42:28.752579130Z","packages":[{"ecosystem":"PyPI","name":"tensorflow-cpu","purl":"pkg:pypi/tensorflow-cpu","ranges":[">=2.8.0 <2.8.1"],"fixed":["2.8.1"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}