{"id":"CVE-2026-65918","summary":"PyTorch torchvision GIF Decoder Out-of-bounds Heap Read","details":"PyTorch torchvision through 0.28.0, fixed in commit 4e05dc2, contains an out-of-bounds heap read vulnerability in the GIF decoder's read_from_tensor callback that passes unclamped length to memcpy. Attackers can supply malicious or truncated GIF files to cause denial of service via segmentation fault or disclose adjacent heap memory contents.","modified":"2026-07-25T08:12:07.744301Z","published":"2026-07-23T17:36:42.799Z","database_specific":{"cwe_ids":["CWE-125"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/65xxx/CVE-2026-65918.json","cna_assigner":"VulnCheck"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/65xxx/CVE-2026-65918.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-65918"},{"type":"ADVISORY","url":"https://www.vulncheck.com/advisories/pytorch-torchvision-gif-decoder-out-of-bounds-heap-read"},{"type":"REPORT","url":"https://github.com/pytorch/vision/issues/9551"},{"type":"FIX","url":"https://github.com/pytorch/vision/commit/4e05dc22f5f050a9528cc0ea09ceca6cdaf8f4ed"},{"type":"FIX","url":"https://github.com/pytorch/vision/pull/9520"},{"type":"PACKAGE","url":"https://github.com/pytorch/vision"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/pytorch/vision","events":[{"introduced":"0"},{"fixed":"8fb87713a24951e639c494b0f2a8a81b5f8e33a6"},{"fixed":"4e05dc22f5f050a9528cc0ea09ceca6cdaf8f4ed"}],"database_specific":{"extracted_events":[{"introduced":"0"},{"fixed":"0.28.0"}],"source":["DESCRIPTION","REFERENCES"]}}],"versions":["v0.28.0-rc2","v0.28.0-rc1","tag_from_my_fork","v0.4.0","v0.2.1","v0.2.0","v0.1.9","v0.1.8","v0.1.7","v0.1.6","v0.1.5"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-65918.json","vanir_signatures_modified":"2026-07-25T08:12:07Z","vanir_signatures":[{"source":"https://github.com/pytorch/vision/commit/4e05dc22f5f050a9528cc0ea09ceca6cdaf8f4ed","target":{"file":"torchvision/csrc/io/image/cpu/decode_gif.cpp","function":"decode_gif"},"deprecated":false,"digest":{"function_hash":"112132269515122070679201174750253132581","length":2687},"id":"CVE-2026-65918-102aff36","signature_type":"Function","signature_version":"v1"},{"id":"CVE-2026-65918-12665c40","signature_type":"Function","signature_version":"v1","source":"https://github.com/pytorch/vision/commit/4e05dc22f5f050a9528cc0ea09ceca6cdaf8f4ed","target":{"file":"torchvision/csrc/io/image/cpu/decode_gif.cpp","function":"read_from_tensor"},"deprecated":false,"digest":{"function_hash":"280455404921887885591313047448875450975","length":348}},{"id":"CVE-2026-65918-1443da4d","signature_type":"Function","signature_version":"v1","source":"https://github.com/pytorch/vision/commit/8fb87713a24951e639c494b0f2a8a81b5f8e33a6","target":{"file":"torchvision/csrc/io/image/cpu/decode_gif.cpp","function":"decode_gif"},"deprecated":false,"digest":{"function_hash":"112132269515122070679201174750253132581","length":2687}},{"digest":{"line_hashes":["287116950136699001826328110265274045585","241599930362376094676090232212194005682","51171007898239082412509034563661975000","279270508737142767250940464214616372129","262815012768025303260000722582759609967","26689528985233545659473290888660546493","15320229776471154267630209268125280188","126775920781419179365776900723565513340","32939749411153876891360162533780043152","34347866392657203696073342677444758757","120694394138037033245195067498717988613","150057024942589753093511323552547581327","86036999864605961883853931719903130984","184862781279256192962279724132253258026","319121864654706858116227764488291508619","141173664417298701392455715551165710818","63926407033617162061508760228572892092"],"threshold":0.9},"id":"CVE-2026-65918-918f85af","signature_type":"Line","signature_version":"v1","source":"https://github.com/pytorch/vision/commit/4e05dc22f5f050a9528cc0ea09ceca6cdaf8f4ed","target":{"file":"torchvision/csrc/io/image/cpu/decode_gif.cpp"},"deprecated":false},{"deprecated":false,"digest":{"line_hashes":["287116950136699001826328110265274045585","241599930362376094676090232212194005682","51171007898239082412509034563661975000","279270508737142767250940464214616372129","262815012768025303260000722582759609967","26689528985233545659473290888660546493","15320229776471154267630209268125280188","126775920781419179365776900723565513340","32939749411153876891360162533780043152","34347866392657203696073342677444758757","120694394138037033245195067498717988613","150057024942589753093511323552547581327","86036999864605961883853931719903130984","184862781279256192962279724132253258026","319121864654706858116227764488291508619","141173664417298701392455715551165710818","63926407033617162061508760228572892092"],"threshold":0.9},"id":"CVE-2026-65918-bc06c681","signature_type":"Line","signature_version":"v1","source":"https://github.com/pytorch/vision/commit/8fb87713a24951e639c494b0f2a8a81b5f8e33a6","target":{"file":"torchvision/csrc/io/image/cpu/decode_gif.cpp"}},{"source":"https://github.com/pytorch/vision/commit/8fb87713a24951e639c494b0f2a8a81b5f8e33a6","target":{"file":"torchvision/csrc/io/image/cpu/decode_gif.cpp","function":"read_from_tensor"},"deprecated":false,"digest":{"function_hash":"280455404921887885591313047448875450975","length":348},"id":"CVE-2026-65918-c7fd9b23","signature_type":"Function","signature_version":"v1"}]}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:N/VA:H/SC:N/SI:N/SA:N"}]}