Description
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.
Published: 2026-07-23
Score: 7.1 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The GIF decoder in PyTorch torchvision, up to version 0.28.0, performs a memcpy using a length that is not properly clamped, creating an out‑of‑bounds heap read. An attacker who can supply a malicious or truncated GIF file can trigger a segmentation fault, causing a denial of service, or can expose adjacent heap memory, potentially leaking sensitive data. The weakness corresponds to CWE‑125.

Affected Systems

PyTorch torchvision versions up to and including 0.28.0 are affected. The vulnerability exists in the vision library maintained by the PyTorch project.

Risk and Exploitability

The CVSS score is 7.1, indicating moderate to high severity. The EPSS score is less than 1 %, showing a low probability of exploitation in the wild. The vulnerability is not listed in the CISA KEV catalog. Although the description does not specify a remote exploitation method, the likely attack scenario involves an application that processes user‑supplied GIF images; an attacker can supply a crafted GIF to trigger the flaw. The exception is that only code paths that invoke the GIF decoder are relevant, and no exploitation depends on elevated privileges or system configuration.

Generated by OpenCVE AI on August 3, 2026 at 21:10 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade PyTorch torchvision to a version where commit 4e05dc22 has been applied.
  • When upgrading is not immediately possible, validate or constrain GIF input: reject files that exceed reasonable size limits or ensure the decoded length is properly clamped before copying.
  • If GIF handling is not essential to your application, consider disabling or removing the GIF decoding functionality to eliminate the attack surface.

Generated by OpenCVE AI on August 3, 2026 at 21:10 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 27 Jul 2026 13:15:00 +0000

Type Values Removed Values Added
First Time appeared Pytorch
Pytorch vision
Vendors & Products Pytorch
Pytorch vision

Thu, 23 Jul 2026 21:45:00 +0000

Type Values Removed Values Added
Description 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.
Title PyTorch torchvision GIF Decoder Out-of-bounds Heap Read
Weaknesses CWE-125
References
Metrics cvssV3_1

{'score': 7.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:H'}

cvssV4_0

{'score': 7.1, 'vector': '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'}

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-07-24T21:35:27.812Z

Reserved: 2026-07-23T12:51:09.596Z

Link: CVE-2026-65918

cve-icon Vulnrichment

Updated: 2026-07-23T18:11:56.623Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-07-23T18:17:02.143

Modified: 2026-07-23T19:17:05.763

Link: CVE-2026-65918

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-03T21:15:04Z

Weaknesses