CVE-2026-31214: The torch-checkpoint-shrink.py script in the ml-engineering project in commit 0099885db36a8f06556efe1faf552518852cb1e0 (
Summary
A script called torch-checkpoint-shrink.py in the ml-engineering project has an insecure deserialization vulnerability (CWE-502, a weakness where untrusted data is converted back into objects without proper validation). The script uses torch.load() to read PyTorch checkpoint files (.pt) without the weights_only=True security setting, which allows attackers to execute arbitrary code (run any commands they want) by providing a malicious checkpoint file. An attacker can exploit this remotely by tricking a user into loading a specially crafted file.
Vulnerability Details
EPSS: 0.0%
May 12, 2026
Classification
Related Issues
Original source: https://nvd.nist.gov/vuln/detail/CVE-2026-31214
First tracked: May 12, 2026 at 02:07 PM
Classified by LLM (prompt v3) · confidence: 95%