Skip to main content
EPSS 1.9%top 21%

PyTorch: `torch.load` with `weights_only=True` leads to remote code execution (CVE-2025-32434)

0
Critical
Published: 04/22/2025 (04/22/2025, 07:19:45 UTC)
Source: GCVE Database
Product: pytorch

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

Bitnamimore threats →ghsa
pytorch
pkg:bitnami/pytorch
Affected versions
<2.6.0

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

AILast updated: 09/08/2026, 13:23:23 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses