{"id":"CVE-2022-29207","summary":"Undefined behavior when users supply invalid resource handles in TensorFlow","details":"TensorFlow is an open source platform for machine learning. Prior to versions 2.9.0, 2.8.1, 2.7.2, and 2.6.4, multiple TensorFlow operations misbehave in eager mode when the resource handle provided to them is invalid. In graph mode, it would have been impossible to perform these API calls, but migration to TF 2.x eager mode opened up this vulnerability. If the resource handle is empty, then a reference is bound to a null pointer inside TensorFlow codebase (various codepaths). This is undefined behavior. Versions 2.9.0, 2.8.1, 2.7.2, and 2.6.4 contain a patch for this issue.","aliases":["BIT-tensorflow-2022-29207","GHSA-5wpj-c6f7-24x8","PYSEC-2026-3112","PYSEC-2026-3280","PYSEC-2026-955"],"modified":"2026-10-22T15:53:20.591960262Z","published":"2022-05-20T22:10:12Z","database_specific":{"cwe_ids":["CWE-20","CWE-475"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/29xxx/CVE-2022-29207.json","cna_assigner":"GitHub_M"},"references":[{"type":"WEB","url":"https://github.com/tensorflow/tensorflow/releases/tag/v2.6.4"},{"type":"WEB","url":"https://github.com/tensorflow/tensorflow/releases/tag/v2.7.2"},{"type":"WEB","url":"https://github.com/tensorflow/tensorflow/releases/tag/v2.8.1"},{"type":"WEB","url":"https://github.com/tensorflow/tensorflow/releases/tag/v2.9.0"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/29xxx/CVE-2022-29207.json"},{"type":"ADVISORY","url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-5wpj-c6f7-24x8"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-29207"},{"type":"FIX","url":"https://github.com/tensorflow/tensorflow/commit/a5b89cd68c02329d793356bda85d079e9e69b4e7"},{"type":"FIX","url":"https://github.com/tensorflow/tensorflow/commit/dbdd98c37bc25249e8f288bd30d01e118a7b4498"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/tensorflow/tensorflow","events":[{"introduced":"0"},{"fixed":"33ed2b11cb8e879d86c371700e6573db1814a69e"},{"introduced":"c256c071bb26e1e13b4666d1b3e229e110bc914a"},{"fixed":"dd7b8a3c1714d0052ce4b4a2fd8dcef927439a24"},{"introduced":"ce35e5c3a8efdb8161c6a85c8fb9ffb5bbdc9ffd"},{"fixed":"a5b89cd68c02329d793356bda85d079e9e69b4e7"},{"fixed":"dbdd98c37bc25249e8f288bd30d01e118a7b4498"},{"fixed":"0516d4d8bced506cae97dc3cb45dbd2fe4311f26"},{"fixed":"8a20d54a3c1bfa38c03ea99a2ad3c1b0a45dfa95"}],"database_specific":{"extracted_events":[{"range":[{"introduced":"0"},{"fixed":"2.6.4"}],"source":"CPE_RANGE","cpe":"cpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:*"},{"cpe":"cpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:*","range":[{"introduced":"2.7.0"},{"fixed":"2.7.2"}],"source":"CPE_RANGE"},{"cpe":"cpe:2.3:a:google:tensorflow:2.7.0:rc0:*:*:*:*:*:*","range":[{"introduced":"2.7.0-rc0"},{"last_affected":"2.7.0-rc0"}],"source":"CPE_STRING"},{"source":"CPE_STRING","cpe":"cpe:2.3:a:google:tensorflow:2.7.0:rc1:*:*:*:*:*:*","range":[{"introduced":"2.7.0-rc1"},{"last_affected":"2.7.0-rc1"}]},{"cpe":"cpe:2.3:a:google:tensorflow:2.8.0:-:*:*:*:*:*:*","range":[{"introduced":"2.8.0-NA"},{"last_affected":"2.8.0-NA"}],"source":"CPE_STRING"},{"range":[{"introduced":"2.8.0-rc0"},{"last_affected":"2.8.0-rc0"}],"source":"CPE_STRING","cpe":"cpe:2.3:a:google:tensorflow:2.8.0:rc0:*:*:*:*:*:*"},{"range":[{"introduced":"2.8.0-rc1"},{"last_affected":"2.8.0-rc1"}],"source":"CPE_STRING","cpe":"cpe:2.3:a:google:tensorflow:2.8.0:rc1:*:*:*:*:*:*"},{"range":[{"introduced":"2.9.0-rc0"},{"last_affected":"2.9.0-rc0"}],"source":"CPE_STRING","cpe":"cpe:2.3:a:google:tensorflow:2.9.0:rc0:*:*:*:*:*:*"},{"source":"CPE_STRING","cpe":"cpe:2.3:a:google:tensorflow:2.9.0:rc1:*:*:*:*:*:*","range":[{"introduced":"2.9.0-rc1"},{"last_affected":"2.9.0-rc1"}]},{"range":[{"fixed":"a5b89cd68c02329d793356bda85d079e9e69b4e7"}],"source":"REFERENCES_COMMIT"},{"range":[{"fixed":"dbdd98c37bc25249e8f288bd30d01e118a7b4498"}],"source":"REFERENCES_COMMIT"},{"source":"REFERENCES_TAG","original_tag":"v2.6.4","range":[{"fixed":"33ed2b11cb8e879d86c371700e6573db1814a69e"}]},{"original_tag":"v2.7.2","range":[{"fixed":"dd7b8a3c1714d0052ce4b4a2fd8dcef927439a24"}],"source":"REFERENCES_TAG"},{"original_tag":"v2.8.1","range":[{"fixed":"0516d4d8bced506cae97dc3cb45dbd2fe4311f26"}],"source":"REFERENCES_TAG"},{"original_tag":"v2.9.0","range":[{"fixed":"8a20d54a3c1bfa38c03ea99a2ad3c1b0a45dfa95"}],"source":"REFERENCES_TAG"}]}}],"versions":["2.7.0-rc0","2.7.0-rc1","2.8.0-NA","2.8.0-rc0","2.8.0-rc1","2.9.0-rc0","2.9.0-rc1","v2.9.0-rc2","v2.9.0-rc1","v2.6.3","v2.7.1","v2.9.0-rc0","v2.8.0","v2.8.0-rc1","v2.6.2","v2.8.0-rc0","v2.7.0","v2.6.1","v2.6.0","v2.6.0-rc2","v2.6.0-rc1","v2.6.0-rc0","v1.12.1","v1.9.0-rc2","v1.6.0-rc1","v1.1.0-rc2","v1.1.0-rc1","0.6.0","0.5.0"],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-29207.json","vanir_signatures":[{"id":"CVE-2022-29207-6c6cda54","signature_type":"Function","signature_version":"v1","source":"https://github.com/tensorflow/tensorflow/commit/a5b89cd68c02329d793356bda85d079e9e69b4e7","target":{"file":"tensorflow/core/common_runtime/eager/execute.cc","function":"GetDeviceForInput"},"deprecated":false,"digest":{"function_hash":"64607090598496931028536097472049551705","length":1062}},{"id":"CVE-2022-29207-eafa9948","signature_type":"Line","signature_version":"v1","source":"https://github.com/tensorflow/tensorflow/commit/a5b89cd68c02329d793356bda85d079e9e69b4e7","target":{"file":"tensorflow/core/common_runtime/eager/execute.cc"},"deprecated":false,"digest":{"line_hashes":["86893508789508861954209002681902995453","273074438881717318334529192467594634264","200919518870065186618318287766453978974","226543973037549166046143234402833604311"],"threshold":0.9}}],"vanir_signatures_modified":"2026-10-22T15:53:20Z"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"}]}