PyTorch Vulnerable to Remote Code Execution via Untrusted Checkpoint Files (CVE-2026-24747)
A vulnerability in PyTorch prior to version 2.10.0 allows remote attackers to execute arbitrary code by crafting malicious checkpoint files (.pth) that exploit the weights_only unpickler. This flaw leads to memory corruption when loading such files with torch.load(..., weights_only=True). The issue is fixed in PyTorch 2.10.0.
AI Analysis
Technical Summary
PyTorch versions before 2.10.0 contain a vulnerability in the weights_only unpickler used to load checkpoint files. An attacker can craft a malicious .pth checkpoint file that, when loaded with torch.load(..., weights_only=True), causes memory corruption and potentially arbitrary code execution. This vulnerability is tracked as CVE-2026-24747 and is related to deserialization of untrusted data (CWE-502). The issue is resolved in PyTorch 2.10.0. Red Hat has published advisories confirming the vulnerability and the availability of a fix. No known exploits are reported in the wild.
Potential Impact
Successful exploitation allows remote attackers to execute arbitrary code on affected systems by loading malicious checkpoint files. This can compromise confidentiality, integrity, and availability of the system running PyTorch. The vulnerability has a high severity rating with a Red Hat CVSS v3 base score of 8.8, indicating a significant risk if exploited.
Mitigation Recommendations
Upgrade PyTorch to version 2.10.0 or later, where this vulnerability is fixed. Avoid loading checkpoint files from untrusted sources using torch.load with weights_only=True. No other mitigations are indicated by the vendor advisory.
PyTorch Vulnerable to Remote Code Execution via Untrusted Checkpoint Files (CVE-2026-24747)
Description
A vulnerability in PyTorch prior to version 2.10.0 allows remote attackers to execute arbitrary code by crafting malicious checkpoint files (.pth) that exploit the weights_only unpickler. This flaw leads to memory corruption when loading such files with torch.load(..., weights_only=True). The issue is fixed in PyTorch 2.10.0.
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
PyTorch versions before 2.10.0 contain a vulnerability in the weights_only unpickler used to load checkpoint files. An attacker can craft a malicious .pth checkpoint file that, when loaded with torch.load(..., weights_only=True), causes memory corruption and potentially arbitrary code execution. This vulnerability is tracked as CVE-2026-24747 and is related to deserialization of untrusted data (CWE-502). The issue is resolved in PyTorch 2.10.0. Red Hat has published advisories confirming the vulnerability and the availability of a fix. No known exploits are reported in the wild.
Potential Impact
Successful exploitation allows remote attackers to execute arbitrary code on affected systems by loading malicious checkpoint files. This can compromise confidentiality, integrity, and availability of the system running PyTorch. The vulnerability has a high severity rating with a Red Hat CVSS v3 base score of 8.8, indicating a significant risk if exploited.
Mitigation Recommendations
Upgrade PyTorch to version 2.10.0 or later, where this vulnerability is fixed. Avoid loading checkpoint files from untrusted sources using torch.load with weights_only=True. No other mitigations are indicated by the vendor advisory.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- BIT-pytorch-2026-24747
- Osv Schema Version
- 1.6.2
- Aliases
- ["CVE-2026-24747"]
- Ecosystems
- ["Bitnami"]
- Database Specific Severity
- High
Threat ID: 6a4c346f27e9c797196025f8
Added to database: 07/06/2026, 23:04:15 UTC
Last enriched: 09/08/2026, 15:11:47 UTC
Last updated: 09/10/2026, 19:36:53 UTC
Views: 16
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.