Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. torch
  4. ›
  5. CVE-2025-32434

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

April 18, 2025

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

References

  • github.com/advisories/GHSA-53q9-r3pm-6pq6
  • github.com/pytorch/pytorch
  • github.com/pytorch/pytorch/commit/8d4b8a920a2172523deb95bf20e8e52d50649c04
  • github.com/pytorch/pytorch/security/advisories/GHSA-53q9-r3pm-6pq6
  • nvd.nist.gov/vuln/detail/CVE-2025-32434

Code Behaviors & Features

Detect and mitigate CVE-2025-32434 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 2.6.0

Fixed versions

  • 2.6.0

Solution

Upgrade to version 2.6.0 or above.

Weakness

  • CWE-502: Deserialization of Untrusted Data

Source file

pypi/torch/CVE-2025-32434.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:39 +0000.