GHSA-63CW-57P8-FM3P
Vulnerability from github – Published: 2026-01-27 20:10 – Updated: 2026-01-27 20:10
VLAI?
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:
- Heap memory corruption via
SETITEM/SETITEMSopcodes applied to non-dictionary types - 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
Severity ?
8.8 (High)
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "pytorch"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.10.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-24747"
],
"database_specific": {
"cwe_ids": [
"CWE-502",
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2026-01-27T20:10:54Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "### Summary\n\nA vulnerability in PyTorch\u0027s `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.\n\n### Vulnerability Details\n\nThe `weights_only=True` unpickler failed to properly validate pickle opcodes and storage metadata, allowing:\n\n1. **Heap memory corruption** via `SETITEM`/`SETITEMS` opcodes applied to non-dictionary types\n2. **Storage size mismatch** between declared element count and actual data in the archive\n\n### Impact\n\nAn attacker who can convince a user to load a malicious checkpoint file may achieve arbitrary code execution in the context of the victim\u0027s process.\n\n\n# Credit\nJi\u0027an Zhou",
"id": "GHSA-63cw-57p8-fm3p",
"modified": "2026-01-27T20:10:54Z",
"published": "2026-01-27T20:10:54Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/pytorch/pytorch/security/advisories/GHSA-63cw-57p8-fm3p"
},
{
"type": "WEB",
"url": "https://github.com/pytorch/pytorch/issues/163105"
},
{
"type": "PACKAGE",
"url": "https://github.com/pytorch/pytorch"
},
{
"type": "WEB",
"url": "https://github.com/pytorch/pytorch/163122/commit/954dc5183ee9205cbe79876ad05dd2d9ae752139"
},
{
"type": "WEB",
"url": "https://github.com/pytorch/pytorch/releases/tag/v2.10.0"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "PyTorch Vulnerable to Remote Code Execution via Untrusted Checkpoint Files"
}
Loading…
Loading…
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…