PyTorch: `torch.load` with `weights_only=True` leads to remote code execution (CVE-2025-32434)
A critical remote code execution vulnerability exists in PyTorch versions prior to 2.6.0 when loading models using torch.load with the weights_only=True parameter. This flaw allows an attacker to execute arbitrary code remotely. The issue has been addressed and patched in PyTorch version 2.6.0.
AI Analysis
Technical Summary
PyTorch, a Python package for tensor computation and deep neural networks, contains a remote code execution vulnerability identified as CVE-2025-32434. The vulnerability occurs in versions 2.5.1 and earlier when the torch.load function is used with the weights_only=True argument. This allows an attacker to execute arbitrary commands remotely. The vulnerability is fixed in version 2.6.0.
Potential Impact
Exploitation of this vulnerability could allow an attacker to execute arbitrary code remotely on systems running vulnerable PyTorch versions when loading models with torch.load and weights_only=True. This could lead to full system compromise depending on the environment and privileges of the PyTorch process.
Mitigation Recommendations
Upgrade PyTorch to version 2.6.0 or later, where this vulnerability has been patched. No other mitigation is required as the fix is officially available.
PyTorch: `torch.load` with `weights_only=True` leads to remote code execution (CVE-2025-32434)
Description
A critical remote code execution vulnerability exists in PyTorch versions prior to 2.6.0 when loading models using torch.load with the weights_only=True parameter. This flaw allows an attacker to execute arbitrary code remotely. The issue has been addressed and patched in PyTorch version 2.6.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, a Python package for tensor computation and deep neural networks, contains a remote code execution vulnerability identified as CVE-2025-32434. The vulnerability occurs in versions 2.5.1 and earlier when the torch.load function is used with the weights_only=True argument. This allows an attacker to execute arbitrary commands remotely. The vulnerability is fixed in version 2.6.0.
Potential Impact
Exploitation of this vulnerability could allow an attacker to execute arbitrary code remotely on systems running vulnerable PyTorch versions when loading models with torch.load and weights_only=True. This could lead to full system compromise depending on the environment and privileges of the PyTorch process.
Mitigation Recommendations
Upgrade PyTorch to version 2.6.0 or later, where this vulnerability has been patched. No other mitigation is required as the fix is officially available.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- BIT-pytorch-2025-32434
- Osv Schema Version
- 1.6.2
- Aliases
- ["CVE-2025-32434"]
- Ecosystems
- ["Bitnami"]
- Database Specific Severity
- Critical
Threat ID: 6aa005ceacd9273b49ab5e0e
Added to database: 09/08/2026, 12:55:42 UTC
Last enriched: 09/08/2026, 13:23:23 UTC
Last updated: 09/10/2026, 19:36:50 UTC
Views: 8
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.