Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconCraft malicious .pt checkpoint
-
DeliveryDistribute via model hub/repository
-
ExploitVictim downloads for processing
-
InstallExecute torch-checkpoint-shrink.py
-
C2torch.load() deserializes pickle payload
-
ExecuteArbitrary code executes with user privileges
-
ImpactEstablish persistence or exfiltrate data
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A08:2025 - Software or Data Integrity Failures
ASVS 5.0
V1 - Encoding and Sanitization Safe deserialization, type allowlists
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the victim to obtain and process a malicious PyTorch checkpoint file (.pt extension) through the torch-checkpoint-shrink.py script from the ml-engineering repository. The attacker must successfully deliver the crafted checkpoint to the target environment through supply chain vectors such as model sharing platforms (HuggingFace, PyTorch Hub, GitHub), compromised file storage, or social engineering. The script must be executed by a user with sufficient privileges for the attacker's objectives-execution as root or with access to sensitive data/systems maximizes impact. No authentication, user interaction (UI:N), or non-default configuration is required once the victim runs the script on the malicious file. Limiting factors include: the victim must actively choose to process the specific malicious checkpoint file; the attack is not remotely triggerable without this file processing step; organizations using isolated networks or strict checkpoint provenance controls significantly reduce exposure; and the vulnerability only affects systems where this specific ml-engineering script is deployed, not all PyTorch installations universally. Detection is possible through monitoring for unexpected child processes from Python ML scripts or filesystem access patterns inconsistent with normal checkpoint processing. |
| Impact | Real-world risk assessment reveals important signal conflicts requiring careful interpretation. CVSS 9.8 (AV:N/AC:L/PR:N/UI:N) indicates critical severity with network attack vector, low complexity, and no privileges required, suggesting remote unauthenticated exploitation. However, 'network vector' here is misleading-the attack actually requires the victim to obtain and process a malicious file, making it more supply-chain or social-engineering dependent than traditional remote exploitation. EPSS 0.06% (19th percentile) indicates very low observed exploitation probability, consistent with targeted attacks rather than widespread campaigns. SSVC framework confirms exploitation status as 'none' (no evidence of active exploitation) but rates as 'automatable: yes' and 'technical impact: total', meaning once initial access is achieved, exploitation is straightforward with full system compromise potential. The contradiction between CVSS network vector and EPSS low probability suggests this is a high-consequence but low-frequency threat. No CISA KEV listing and no public POC identified at time of analysis. Primary risk exists for organizations that: (1) process checkpoint files from untrusted sources, (2) use ml-engineering scripts in production pipelines, or (3) accept user-uploaded model files. Lower priority for isolated research environments with trusted file sources only. |
| Exploit ScenarioDerived | An attacker creates a malicious PyTorch checkpoint file containing a pickled Python object with a __reduce__ method that executes arbitrary system commands upon deserialization. The attacker distributes this file through model sharing platforms, GitHub repositories, or direct file sharing, disguised as a legitimate pre-trained model checkpoint. When a data scientist or ML engineer downloads this checkpoint and runs torch-checkpoint-shrink.py to reduce its size, the torch.load() call at line 57 deserializes the malicious pickle object, immediately executing the embedded commands with the privileges of the user running the script. This could install backdoors, exfiltrate sensitive training data or credentials, or compromise the entire machine learning infrastructure. The low attack complexity (AC:L) means no special exploitation techniques are required beyond crafting the malicious pickle payload, with publicly documented methods for weaponizing pickle available in security research. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 13, 2026
Arbitrary code execution via torch-checkpoint-shrink.py script in ml-engineering project allows remote attackers to execute malicious Python code by providing crafted PyTorch checkpoint files. The vulnerability stems from insecure deserialization where torch.load() processes .pt files without the weights_only=True safeguard, enabling pickle-based arbitrary object instantiation. Despite a critical CVSS 9.8 score, EPSS probability is low (0.06%, 19th percentile) and no public exploit or active exploitation is confirmed, suggesting limited real-world targeting to date. SSVC assessment indicates total technical impact with automatable exploitation potential, making this a priority for organizations using ml-engineering scripts in production environments.
RemediationAI
Update the torch-checkpoint-shrink.py script by adding weights_only=True parameter to all torch.load() calls, specifically at line 57 where the vulnerability exists. Modify the code from torch.load(file_path) to torch.load(file_path, weights_only=True) to restrict deserialization to tensor data only. No formal patched release version exists as this is a script repository-users must manually apply the fix by editing their local copy or pulling updated commits if the maintainer has released a fix. As an immediate compensating control, implement input validation to process checkpoint files only from trusted, cryptographically verified sources such as signed model registries. Deploy the script in sandboxed execution environments (containers with no network access, restricted filesystem permissions, non-privileged user accounts) to limit blast radius of successful exploitation-note this reduces but does not eliminate risk as code execution still occurs within the sandbox context. For production ML pipelines, implement checkpoint integrity verification using cryptographic signatures before processing, and maintain an allowlist of approved checkpoint sources. Audit all PyTorch-using scripts for similar torch.load() calls without weights_only=True. Trade-off: weights_only=True may break compatibility with checkpoints containing custom objects or optimizer states-test thoroughly in development before production deployment.
Affected VersionsENISA
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
This vulnerability exploits Python's pickle module, used by PyTorch's torch.load() function for serializing model checkpoints. Pickle can deserialize arbitrary Python objects, including those with __reduce__ methods that execute code during unpickling. The torch-checkpoint-shrink.py script at line 57 (commit 0099885db36a8f06556efe1faf552518852cb1e0) calls torch.load() without the weights_only=True parameter introduced in PyTorch 1.13+ to prevent arbitrary code execution. CWE-502 (Deserialization of Untrusted Data) occurs when applications deserialize data from untrusted sources without validation. In machine learning workflows, checkpoint files are often shared via repositories, cloud storage, or model hubs, creating multiple attack vectors. The CPE data is generic (n/a), indicating the vulnerability affects the ml-engineering GitHub repository scripts rather than a formally packaged product. The attack requires only that a victim process a malicious .pt file through this script, with no authentication barriers for file sourcing.
Know when Checkpoint gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Primary rating from NVD · only source for this CVE.
CVSS VectorNVD
Lifecycle Timeline
3DescriptionCVE.org
The torch-checkpoint-shrink.py script in the ml-engineering project in commit 0099885db36a8f06556efe1faf552518852cb1e0 (2025-20-27) contains an insecure deserialization vulnerability (CWE-502). The script uses torch.load() to process PyTorch checkpoint files (.pt) without enabling the security-restrictive weights_only=True parameter. This oversight allows the deserialization of arbitrary Python objects via the pickle module. A remote attacker can exploit this by providing a maliciously crafted checkpoint file, leading to arbitrary code execution in the context of the user running the script.
Executive ViewAI
CVE-2026-31214 is a critical arbitrary code execution vulnerability in the ml-engineering project's torch-checkpoint-shrink.py script that allows remote attackers to execute malicious code through crafted PyTorch checkpoint files. Organizations using this tool to process untrusted checkpoint files face immediate risk of complete system compromise, though current exploitation probability remains low. Immediate action is required for any production deployments handling external checkpoint sources.
Immediate mitigations pending patch availability: (1) restrict torch-checkpoint-shrink.py execution to process only checkpoint files from trusted/verified internal sources; (2) implement network-level controls to prevent checkpoint processing systems from accessing sensitive data or production systems; (3) run checkpoint processing in isolated, non-privileged containers with minimal filesystem access; (4) disable automatic checkpoint processing workflows and require manual approval for external files; (5) monitor for CVE-2026-31214 patch releases from ml-engineering project and apply immediately upon availability.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Insecure deserialization occurs when an application converts serialized data (a stream of bytes representing an object's state) back into a living object without proper validation.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
More in Checkpoint
View allGNU Bash through 4.3 processes trailing strings after function definitions in the values of environment variables, which
Potentially allowing an attacker to read certain information on Check Point Security Gateways once connected to the inte
GNU Bash through 4.3 bash43-025 processes trailing strings after certain malformed function definitions in the values of
backend/comics/comics-document.c (aka the comic book backend) in GNOME Evince before 3.24.1 allows remote attackers to e
Remote code execution in Check Point Quantum Security Gateway arises from improper certificate trust validation during V
Authentication bypass in the Check Point SmartConsole login process lets an unauthenticated remote attacker mint a valid
Authentication bypass in Check Point Quantum Security Gateway and Spark Firewalls allows unauthenticated remote attacker
Unauthenticated attackers who can reach the file-upload interface of Check Point Management Server can combine directory
Local privilege escalation in Check Point Gaia OS lets an authenticated local user execute commands as root by writing t
An OpenSSL TLS server may crash if sent a maliciously crafted renegotiation ClientHello message from a client. Rated med
Remote code execution in Check Point Quantum Security Gateway and Quantum Security Management stems from a heap-based bu
Unauthenticated remote code execution affects Check Point Quantum Security Management, where a stack-based buffer overfl
EUVD-2026-29498
GHSA-qw5f-8jqw-9832
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB