Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft pickle with reduce calling Grammar.loads
-
DeliveryPublish poisoned model artifact
-
ExploitScan passes picklescan as clean
-
ExecutionVictim runs pickle.load()
-
ImpactAttacker code executes on host
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 that the victim uses picklescan (a version before 0.0.29) to vet a file and then deserializes that file with pickle.load()/pickle deserialization - the vulnerability is specifically a scanner-evasion via a reduce method calling lib2to3.pgen2.grammar.Grammar.loads, so it only matters where picklescan is the trusted gate. Limiting factors, reflected in the CVSS vector: passive user interaction is needed (UI:P - the victim must load the crafted pickle), and an attack requirement exists (AT:P - the victim's workflow must actually rely on picklescan's verdict rather than sandboxing or non-pickle formats). No authentication is required against the scanning/loading workflow (PR:N), and delivery is network-based (AV:N) via any channel that ships a pickle/model file to the victim. |
| Impact | This is a genuine but conditional risk rather than a mass-exploitation emergency. The CVSS 4.0 score of 7.6 (High) with vector AV:N/AC:L/AT:P/PR:N/UI:P encodes the key nuance: exploitation is network-deliverable and requires no privileges, but carries an Attack Requirement (AT:P) - the victim must actually rely on picklescan as a gate - and Passive user interaction (UI:P), since the victim must load the crafted file. Vulnerable-system confidentiality and integrity are High (VC:H/VI:H) with no availability impact rated (VA:N) and no scope change to other systems (SC:N/SI:N/SA:N). There is no EPSS score, no KEV listing, and no published POC in the provided data, so the practical priority is moderate: the real-world blast radius depends entirely on how many pipelines trust picklescan output. The most important signal is the trust-inversion - a security scanner that returns a false-negative is more dangerous than a raw pickle risk because it actively reassures the victim. No conflicting signals are present, though the absence of EPSS/POC data means exploitation likelihood cannot be quantified. |
| Exploit ScenarioDerived | An attacker publishes a poisoned ML model (e.g., to a model hub or via a supply-chain artifact) containing a pickle whose reduce method invokes lib2to3.pgen2.grammar.Grammar.loads to smuggle in executable code. A victim runs picklescan (pre-0.0.29) as a pre-flight safety check, sees a clean result, and then loads the model with pickle.load(), at which point the attacker's code executes in the victim's context. No POC is published in the provided data, but the AT:P/UI:P vector confirms the attack hinges on the victim both trusting the scanner and loading the file. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 04, 2026
Detection bypass in picklescan before 0.0.29 lets attackers slip malicious pickle payloads past the scanner by abusing lib2to3.pgen2.grammar.Grammar.loads inside a pickle reduce method, resulting in remote code execution when the file is later deserialized with pickle.load(). Because picklescan is trusted as a safety gate for machine-learning model files, a bypass converts a 'scanned and clean' verdict into silent arbitrary code execution. No public exploit has been identified at time of analysis and the flaw is not listed in CISA KEV, though the technique is concretely described in the VulnCheck advisory.
RemediationAI
Upgrade to picklescan 0.0.29 or later, which adds detection for the lib2to3.pgen2.grammar.Grammar.loads gadget (Vendor-released patch: 0.0.29); consult GHSA-f54q-57x4-jg88 (https://github.com/mmaitre314/picklescan/security/advisories/GHSA-f54q-57x4-jg88) and the VulnCheck advisory for details. Because picklescan is a detection layer and not a runtime sandbox, do not treat a clean scan from any version as a guarantee - prefer loading untrusted model artifacts using safetensors or another non-executable serialization format, which eliminates pickle code execution entirely at the cost of migrating file formats. Where pickle must be used, restrict deserialization to trusted, signed, or checksum-verified sources and load in an isolated/sandboxed process with no network and least privilege so that even a scanner bypass cannot reach sensitive systems. Pin and monitor the picklescan dependency version across CI/CD so the fixed release is actually deployed everywhere the scan is relied upon.
Affected VersionsENISA
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 security tool that statically inspects pickle (and pickle-bearing) files for dangerous opcodes/imports before they are loaded, and is widely used to vet untrusted machine-learning model artifacts. The root cause is CWE-502 (Deserialization of Untrusted Data): Python's pickle format permits arbitrary callables via the __reduce__ mechanism, and picklescan maintains an allow/deny model of which global references are considered dangerous. The bypass leverages lib2to3.pgen2.grammar.Grammar.loads - a method in Python's standard library 2to3 grammar module that itself unpickles data - which was not on picklescan's blocklist, so a reduce callable pointing at Grammar.loads passes the scan yet triggers a nested unpickle chain executing attacker code during pickle.load(). The affected CPE is cpe:2.3:a:picklescan:picklescan (all versions prior to 0.0.29).
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:P/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
AC:H because it requires both a crafted evasion gadget and victim reliance on picklescan; UI:R since the victim must load the pickle; PR:N as no auth is needed; full C/I/A from arbitrary code execution.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
1DescriptionCVE.org
picklescan before 0.0.29 fails to detect malicious pickle payloads that utilize lib2to3.pgen2.grammar.Grammar.loads in the reduce method, allowing remote code execution. Attackers can craft pickle files embedding dangerous code that evades picklescan detection and executes during pickle.load() deserialization.
Executive ViewAI
picklescan, a critical validation tool for machine-learning model security, contains a detection bypass vulnerability that allows attackers to inject executable code into pickle files without triggering security alerts. Organizations relying on picklescan as a gating mechanism for model imports risk silent remote code execution when compromised files are processed, effectively converting a trusted safety control into an attack vector.
No vendor-released patch identified at time of analysis. Interim mitigations: (1) Isolate model training and inference to air-gapped or sandboxed environments; (2) Require cryptographic signing and source authentication for all model files; (3) Layer additional deserialization validators before pickle.load() calls; (4) Restrict automatic model loading and require manual verification steps; (5) Establish weekly monitoring of security advisories and picklescan releases for patch 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.
Related Vulnerabilities in picklescan Malicious Pickle Detection Bypass
View all 16More 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
EUVD-2025-210416
GHSA-vp8m-mf3r-82q9
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB