CVE-2026-31214: n/a
CVE-2026-31214 is a critical vulnerability in the torch-checkpoint-shrink.py script of the ml-engineering project. The script insecurely deserializes PyTorch checkpoint files using torch.load() without the security-restrictive weights_only=True parameter. This allows an attacker to craft malicious checkpoint files that, when loaded, can execute arbitrary code in the context of the user running the script. The vulnerability is due to unsafe deserialization (CWE-502) via Python's pickle module. There is no official patch or remediation guidance currently available.
AI Analysis
Technical Summary
The torch-checkpoint-shrink.py script in the ml-engineering project uses torch.load() to deserialize PyTorch checkpoint files (.pt) without enabling the weights_only=True parameter, which restricts deserialization to tensor weights only. This insecure deserialization vulnerability (CWE-502) allows an attacker to supply a malicious checkpoint file that executes arbitrary Python code upon loading. The vulnerability has a CVSS 3.1 base score of 9.8, indicating critical severity with network attack vector, no privileges required, and no user interaction needed.
Potential Impact
Successful exploitation allows remote attackers to execute arbitrary code on the system running the vulnerable script, potentially leading to full system compromise. The impact includes complete confidentiality, integrity, and availability loss as indicated by the CVSS vector (C:H/I:H/A:H). No known exploits in the wild have been reported to date.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, users should avoid loading untrusted PyTorch checkpoint files with this script or modify the script to use torch.load() with the weights_only=True parameter to restrict deserialization to tensor weights only.
CVE-2026-31214: n/a
Description
CVE-2026-31214 is a critical vulnerability in the torch-checkpoint-shrink.py script of the ml-engineering project. The script insecurely deserializes PyTorch checkpoint files using torch.load() without the security-restrictive weights_only=True parameter. This allows an attacker to craft malicious checkpoint files that, when loaded, can execute arbitrary code in the context of the user running the script. The vulnerability is due to unsafe deserialization (CWE-502) via Python's pickle module. There is no official patch or remediation guidance currently available.
CVSS v3.1
Score 9.8critical
Affected software
pkg:github/stas00/ml-engineeringRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The torch-checkpoint-shrink.py script in the ml-engineering project uses torch.load() to deserialize PyTorch checkpoint files (.pt) without enabling the weights_only=True parameter, which restricts deserialization to tensor weights only. This insecure deserialization vulnerability (CWE-502) allows an attacker to supply a malicious checkpoint file that executes arbitrary Python code upon loading. The vulnerability has a CVSS 3.1 base score of 9.8, indicating critical severity with network attack vector, no privileges required, and no user interaction needed.
Potential Impact
Successful exploitation allows remote attackers to execute arbitrary code on the system running the vulnerable script, potentially leading to full system compromise. The impact includes complete confidentiality, integrity, and availability loss as indicated by the CVSS vector (C:H/I:H/A:H). No known exploits in the wild have been reported to date.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, users should avoid loading untrusted PyTorch checkpoint files with this script or modify the script to use torch.load() with the weights_only=True parameter to restrict deserialization to tensor weights only.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- mitre
- Date Reserved
- 2026-03-09T00:00:00.000Z
- Cvss Version
- null
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a034c84cbff5d8610fe99c9
Added to database: 05/12/2026, 15:51:32 UTC
Last enriched: 05/19/2026, 18:47:13 UTC
Last updated: 07/31/2026, 19:22:58 UTC
Views: 50
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.