CVE-2025-32434

ADVISORY - github

Summary

Description

I found a Remote Command Execution (RCE) vulnerability in PyTorch. When loading model using torch.load with weights_only=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 weights_only=True to be safe. Since everyone knows that weights_only=False is unsafe, so they will use the weights_only=True to mitigate the seucirty issue. But now, I just proved that even if you use weights_only=True, it can still achieve RCE.

Credit

This vulnerability was found by Ji'an Zhou.

EPSS Score: 0.00225 (0.452)

Common Weakness Enumeration (CWE)

ADVISORY - nist

Deserialization of Untrusted Data

ADVISORY - github

Deserialization of Untrusted Data

ADVISORY - gitlab

OWASP Top Ten 2017 Category A9 - Using Components with Known Vulnerabilities

Deserialization of Untrusted Data

OWASP Top Ten 2013 Category A9 - Using Components with Known Vulnerabilities


Sign in to Docker Scout

See which of your images are affected by this CVE and how to fix them by signing into Docker Scout.

Sign in