{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2022-29210","id":"CVE-2022-29210","title":"Heap buffer overflow due to incorrect hash function in TensorFlow","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 `Alloca","descriptionLong":"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.","published":"2022-05-20T23:25:21.000Z","updated":"2026-10-28T10:28:02.485449201Z","reserved":"2022-04-13T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"GitHub_M"},"metrics":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"GitHub_M"},{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"github.com"},{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"NVD"},{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"OSV"},{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"GitHub"},{"version":"2.0","score":2.1,"vector":"AV:L/AC:L/Au:N/C:N/I:N/A:P","rating":"low","source":"NVD"}],"rating":"medium","products":["tensorflow"],"affectedProducts":[{"vendor":"tensorflow","product":"tensorflow","defaultStatus":null,"versions":[{"status":"affected","version":"== 2.8.0"}],"platforms":[]}],"packages":[{"ecosystem":"PyPI","name":"tensorflow","purl":"pkg:pypi/tensorflow","ranges":[">=2.8.0 <2.8.1"],"fixed":["2.8.1"],"advisory":"GHSA-hc2f-7r5r-r2hg"},{"ecosystem":"PyPI","name":"tensorflow-cpu","purl":"pkg:pypi/tensorflow-cpu","ranges":[">=2.8.0 <2.8.1"],"fixed":["2.8.1"],"advisory":"GHSA-hc2f-7r5r-r2hg"},{"ecosystem":"PyPI","name":"tensorflow-gpu","purl":"pkg:pypi/tensorflow-gpu","ranges":[">=2.8.0 <2.8.1"],"fixed":["2.8.1"],"advisory":"GHSA-hc2f-7r5r-r2hg"}],"cwes":["CWE-120","CWE-122","CWE-787"],"aliases":["BIT-tensorflow-2022-29210","GHSA-hc2f-7r5r-r2hg","PYSEC-2026-1007","PYSEC-2026-3200","PYSEC-2026-3339"],"references":[{"url":"https://github.com/tensorflow/tensorflow/releases/tag/v2.8.1","tags":["x_refsource_MISC","x_transferred","Release Notes","Third Party Advisory","web"]},{"url":"https://github.com/tensorflow/tensorflow/releases/tag/v2.9.0","tags":["x_refsource_MISC","x_transferred","Release Notes","Third Party Advisory","web"]},{"url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-hc2f-7r5r-r2hg","tags":["x_refsource_CONFIRM","x_transferred","Patch","Third Party Advisory","advisory","web"]},{"url":"https://github.com/tensorflow/tensorflow/commit/1b85a28d395dc91f4d22b5f9e1e9a22e92ccecd6","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://github.com/tensorflow/tensorflow/blob/f3b9bf4c3c0597563b289c0512e98d4ce81f886e/tensorflow/core/framework/tensor_key.h#L53-L64","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/29xxx/CVE-2022-29210.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-29210","tags":["advisory"]},{"url":"https://github.com/tensorflow/tensorflow","tags":["package"]},{"url":"https://pypi.org/project/tensorflow-gpu","tags":["package"]},{"url":"https://github.com/advisories/GHSA-hc2f-7r5r-r2hg","tags":["advisory"]},{"url":"https://pypi.org/project/tensorflow","tags":["package"]},{"url":"https://pypi.org/project/tensorflow-cpu","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial"},"epss":0.0023,"epssPercentile":0.13954,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2022-29210","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-29210","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2022-29210","ok":true,"note":"3 packages"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-hc2f-7r5r-r2hg","ok":true,"note":"GHSA-hc2f-7r5r-r2hg"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2022-29210","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}