CVE-2025-32434CWE-502

PyTorch: `torch.load` with `weights_only=True` leads to remote code execution

Critical · published April 18, 2025

CVSS v4.0
9.3
EPSS
2%
Percentile
83.7
In the wild
Unconfirmed
What it is

🔥 A tiny oversight in PyTorch could let attackers execute commands remotely – it's like leaving the door to your data center wide open! Think of it like a faulty vending machine that dispenses not just snacks but also the secrets inside the building. If someone knows how to load a model improperly, they could reach into the system and grab whatever they want! This flaw could allow attackers to run any command on your server, potentially leading to data breaches or total system compromise. Imagine malicious actors waltzing right in, changing configurations, or even deleting critical files – absolutely devastating!

Put simply

Think of it like a faulty vending machine that dispenses not just snacks but also the secrets inside the building. If someone knows how to load a model improperly, they could reach into the system and grab whatever they want! The vulnerability arises when using torch.load with weights_only=True in versions 2.5.1 and earlier, permitting remote code execution through untrusted model loading.

What to do

This flaw could allow attackers to run any command on your server, potentially leading to data breaches or total system compromise. Imagine malicious actors waltzing right in, changing configurations, or even deleting critical files – absolutely devastating! Update to PyTorch version 2.6.0 immediately to patch this critical vulnerability. It's also a good idea to review how models are loaded and implement strict checks on input data to mitigate future risks. You've got this! Stay proactive and secure your systems! 🛡️

The record
Technical detail
CVSS v4.0
9.3 · CRITICAL
Vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
EPSS
0.02369 · 83.7th percentile
Weakness
CWE-502 · Deserialization of Untrusted Data
Published
2025-04-18T15:48Z
EPSS history
Timeline
  • 18 APR 15:48Z
    PyTorch: `torch.load` with `weights_only=True` leads to remote code execution
    cvelistv5