---
id: CVE-2026-65918
title: >-
  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
summary: >-
  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 trunc…
severity: high
cvss: 7.1
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:H'
cwe:
  - CWE-125
vendor: linuxfoundation
product: torchvision
affected:
  - torchvision <= 0.28.0
published: '2026-07-23'
updated: '2026-09-17'
sourceUpdated: '2026-09-17T18:17:01.600'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-65918'
references:
  - url: >-
      https://github.com/pytorch/vision/commit/4e05dc22f5f050a9528cc0ea09ceca6cdaf8f4ed
    label: disclosure@vulncheck.com
  - url: 'https://github.com/pytorch/vision/issues/9551'
    label: disclosure@vulncheck.com
  - url: 'https://github.com/pytorch/vision/pull/9520'
    label: disclosure@vulncheck.com
  - url: >-
      https://www.vulncheck.com/advisories/pytorch-torchvision-gif-decoder-out-of-bounds-heap-read
    label: disclosure@vulncheck.com
tags:
  - nvd
  - cve.org
  - exploit-available
exploitAvailable: true
ssvc:
  exploitation: poc
  automatable: 'no'
  technicalImpact: partial
  timestamp: '2026-07-23T18:11:49.816662Z'
epss: 0.00445
epssPercentile: 0.36022
ingestedAt: '2026-08-22T13:32:35.637Z'
---

## Overview

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.

## Affected

- `torchvision <= 0.28.0`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
