Vulnerability GHSA-63cw-57p8-fm3p

High Risk
HIGH RISK
CVSS Score: 8.8
Score Range: 7.0–8.9
High severity vulnerabilities (CVSS 7.0–8.9). Serious vulnerabilities that should be prioritized soon after critical fixes.
9 months ago
January 27, 2026 at 08:10 PM UTC
PyTorch Vulnerable to Remote Code Execution via Untrusted Checkpoint Files
1.0.0 - 2.9.1
1.0.0 - 2.9.1

Summary

PyTorch Vulnerable to Remote Code Execution via Untrusted Checkpoint Files

Details

Summary

A vulnerability in PyTorch's weights_only unpickler allows an attacker to craft a malicious checkpoint file (.pth) that, when loaded with torch.load(..., weights_only=True), can corrupt memory and potentially lead to arbitrary code execution.

Vulnerability Details

The weights_only=True unpickler failed to properly validate pickle opcodes and storage metadata, allowing:

  1. Heap memory corruption via SETITEM/SETITEMS opcodes applied to non-dictionary types
  2. Storage size mismatch between declared element count and actual data in the archive

Impact

An attacker who can convince a user to load a malicious checkpoint file may achieve arbitrary code execution in the context of the victim's process.

Credit

Ji'an Zhou

Impacted packages

Timeline

Published
9 months ago
January 27, 2026 at 08:10 PM UTC
Fixed (2.10.0)
8 months ago
February 10, 2026 at 09:44 PM UTC
Last Modified
7 hours ago
November 04, 2026 at 03:15 AM UTC