Security Digest · Vulnerability record

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

PyTorch is a Python package that provides tensor computation with strong GPU acceleration and deep neural networks built on a tape-based autograd system.

CVSS 9.3 Critical EPSS 2.4% · p84

Should you act?

Critical and remotely reachable

No known exploitation yet, but it is network-reachable without credentials. This signal is computed from CISA KEV, EPSS and CVSS data; it is not an editorial verdict.

  • No confirmed exploitation. It is not in CISA’s KEV catalog and CISA’s SSVC assessment records no known exploitation. That can change quickly after a public write-up; re-check if you are affected.
  • EPSS 2.4%, percentile 84: FIRST’s model estimates a 2.4% chance of exploitation activity in the next 30 days, higher than 84% of all scored CVEs (elevated). EPSS is a probability, not a verdict.
  • Remotely reachable with no login and no user interaction. If the vulnerable service is exposed to the internet, prioritize it.
  • Only applies if your dependency tree includes torch (PyPI) < 2.6.0, fixed in 2.6.0. Check your lockfile, including transitive dependencies.

What it is

PyTorch is a Python package that provides tensor computation with strong GPU acceleration and deep neural networks built on a tape-based autograd system. In version 2.5.1 and prior, a Remote Command Execution (RCE) vulnerability exists in PyTorch when loading a model using torch.load with weightsonly=True. This issue has been patched in version 2.6.0.

From the GitHub advisory

Description I found a Remote Command Execution (RCE) vulnerability in PyTorch. When loading model using torch.load with weightsonly=True, it can still achieve RCE.

Background knowledge https://github.com/pytorch/pytorch/security As you can see, the PyTorch official documentation considers using torch.load() with weightsonly=True to be safe. Since everyone knows that weightsonly=False is unsafe, so they will use the weightsonly=True to mitigate the seucirty issue. But now, I just proved that even if you use weightsonly=True, it can still achieve RCE.

Credit This vulnerability was found by Ji'an Zhou.

Weakness type: CWE-502.

Product: torch (PyPI) · Assigned by: GitHub_M · Published: 2025-04-18

Affected and fixed versions

EcosystemPackageVulnerableFirst fixed
PyPItorch< 2.6.02.6.0
VendorProductAffected versions (per CVE record)
pytorchpytorch< 2.6.0

Severity scores

Scored byCVSSScoreVector
GitHub_M4.09.3 CriticalCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
GitHub4.09.3 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
  • Attack vector: network (remotely reachable)
  • Attack complexity: low
  • Attack requirements: none
  • Privileges required: none (no login)
  • User interaction: none

CVSS measures how bad a flaw is if exploited, not how likely exploitation is. Read it next to the exploitation data below.

Exploitation and urgency

  • CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
  • CISA SSVC assessment: exploitation none, automatable yes, technical impact total.
  • FIRST EPSS (model of 2026-10-21): 2.37% probability of exploitation activity in the next 30 days; percentile 84.

Timeline

  • — CVE record published by GitHub_M
  • — GitHub-reviewed advisory GHSA-53q9-r3pm-6pq6 published (critical)
  • — CVE record last updated

Sources and references

Original sources first. Version and fix details should always be confirmed against the vendor or project advisory.

Vulnerability records

  1. GitHub Advisory GHSA-53q9-r3pm-6pq6 github.com
  2. CVE.org record CVE-2025-32434 cve.org
  3. NVD entry CVE-2025-32434 nvd.nist.gov

Other references from the CVE record and advisory

  1. github.com github.com
  2. lists.debian.org lists.debian.org
  3. github.com github.com
  4. github.com github.com

Critical PyPI advisories · Today’s Security Digest