---
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
  - url: >-
      https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-65918.json
  - url: 'https://access.redhat.com/security/cve/CVE-2026-65918'
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2506549'
  - url: 'https://www.cve.org/CVERecord?id=CVE-2026-65918'
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-65918'
  - url: 'https://access.redhat.com/errata/RHSA-2026:84734'
tags:
  - nvd
  - cve.org
  - exploit-available
  - csaf
  - vex
  - red-hat
exploitAvailable: true
ssvc:
  exploitation: poc
  automatable: 'no'
  technicalImpact: partial
  timestamp: '2026-07-23T18:11:49.816662Z'
epss: 0.00445
epssPercentile: 0.38478
ingestedAt: '2026-08-22T13:32:35.637Z'
patched:
  - openshift_ai 3.4
---

## 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.

## Vendor advisories

- **Red Hat VEX** · Important · affected: Lightspeed Core, Red Hat Enterprise Linux AI (RHEL AI) 3, Red Hat OpenShift AI (RHOAI) · no fix planned: Red Hat Enterprise Linux AI (RHEL AI) 3, Lightspeed Core, Red Hat OpenShift AI (RHOAI) · updated 2026-10-19 · [vex](https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-65918.json)
- **RHSA-2026:84734** · Red Hat · fixed in: Red Hat OpenShift AI 3.4 · released 2026-10-19 · [advisory](https://access.redhat.com/errata/RHSA-2026:84734)
