{"id":"CVE-2022-29208","summary":"Segfault and Out-of-bounds Write write due to incomplete validation 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, the implementation of `tf.raw_ops.EditDistance` has incomplete validation. Users can pass negative values to cause a segmentation fault based denial of service. In multiple places throughout the code, one may compute an index for a write operation. However, the existing validation only checks against the upper bound of the array. Hence, it is possible to write before the array by massaging the input to generate negative values for `loc`. Versions 2.9.0, 2.8.1, 2.7.2, and 2.6.4 contain a patch for this issue.","aliases":["BIT-tensorflow-2022-29208","GHSA-2r2f-g8mw-9gvr","PYSEC-2026-943"],"modified":"2026-07-09T05:41:12.085438Z","published":"2022-05-20T22:30:13Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/29xxx/CVE-2022-29208.json","cwe_ids":["CWE-787"],"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-29208.json"},{"type":"ADVISORY","url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-2r2f-g8mw-9gvr"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-29208"},{"type":"FIX","url":"https://github.com/tensorflow/tensorflow/commit/30721cf564cb029d34535446d6a5a6357bebc8e7"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/tensorflow/tensorflow","events":[{"introduced":"0"},{"fixed":"33ed2b11cb8e879d86c371700e6573db1814a69e"},{"introduced":"c256c071bb26e1e13b4666d1b3e229e110bc914a"},{"fixed":"dd7b8a3c1714d0052ce4b4a2fd8dcef927439a24"},{"introduced":"ce35e5c3a8efdb8161c6a85c8fb9ffb5bbdc9ffd"},{"fixed":"30721cf564cb029d34535446d6a5a6357bebc8e7"},{"fixed":"0516d4d8bced506cae97dc3cb45dbd2fe4311f26"},{"fixed":"8a20d54a3c1bfa38c03ea99a2ad3c1b0a45dfa95"}],"database_specific":{"source":["CPE_RANGE","CPE_STRING","REFERENCES"],"cpe":["cpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:*","cpe:2.3:a:google:tensorflow:2.7.0:rc0:*:*:*:*:*:*","cpe:2.3:a:google:tensorflow:2.7.0:rc1:*:*:*:*:*:*","cpe:2.3:a:google:tensorflow:2.8.0:-:*:*:*:*:*:*","cpe:2.3:a:google:tensorflow:2.8.0:rc0:*:*:*:*:*:*","cpe:2.3:a:google:tensorflow:2.8.0:rc1:*:*:*:*:*:*","cpe:2.3:a:google:tensorflow:2.9.0:rc0:*:*:*:*:*:*","cpe:2.3:a:google:tensorflow:2.9.0:rc1:*:*:*:*:*:*"],"extracted_events":[{"introduced":"0"},{"fixed":"2.6.4"},{"introduced":"2.7.0"},{"fixed":"2.7.2"},{"introduced":"2.7.0-rc0"},{"last_affected":"2.7.0-rc0"},{"introduced":"2.7.0-rc1"},{"last_affected":"2.7.0-rc1"},{"introduced":"2.8.0-NA"},{"last_affected":"2.8.0-NA"},{"introduced":"2.8.0-rc0"},{"last_affected":"2.8.0-rc0"},{"introduced":"2.8.0-rc1"},{"last_affected":"2.8.0-rc1"},{"introduced":"2.9.0-rc0"},{"last_affected":"2.9.0-rc0"},{"introduced":"2.9.0-rc1"},{"last_affected":"2.9.0-rc1"}]}}],"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/cve-osv-conversion/osv-output/CVE-2022-29208.json","vanir_signatures":[{"id":"CVE-2022-29208-107862db","deprecated":false,"source":"https://github.com/tensorflow/tensorflow/commit/30721cf564cb029d34535446d6a5a6357bebc8e7","target":{"file":"tensorflow/core/kernels/edit_distance_op.cc"},"signature_version":"v1","signature_type":"Line","digest":{"line_hashes":["170392583267117944075908960145150999119","228542732139373583816918399113116219644","51617711010549388191296594772232087683","41205375568711973006615550765268257693","137520545693340581730027872598466772574","139129468021705172483694659779326693599","46171101562262908684007229469576449913","228542732139373583816918399113116219644","51617711010549388191296594772232087683","41205375568711973006615550765268257693","137520545693340581730027872598466772574","72064817567286684918088360675715298772","170392583267117944075908960145150999119","228542732139373583816918399113116219644","51617711010549388191296594772232087683","41205375568711973006615550765268257693","137520545693340581730027872598466772574","308251398948300789344232532351808514815","46171101562262908684007229469576449913","228542732139373583816918399113116219644","300830000448958046402319703572617280209","248103089283203554655031186472040985659","199006230772124153770367957531592033667","2591698093621062951014450495184149479","170392583267117944075908960145150999119","228542732139373583816918399113116219644","300830000448958046402319703572617280209","248103089283203554655031186472040985659","199006230772124153770367957531592033667","169492145863100466030160683995813000600"],"threshold":0.9}}],"vanir_signatures_modified":"2026-07-09T05:41:12Z"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H"}]}