CVE-2025-71376: picklescan: scanner bypass enables undetected RCE
HIGHpicklescan before 0.0.29 contains a detection gap that allows attackers to craft malicious pickle files using the `idlelib.autocomplete.AutoComplete.fetch_completions` reduce method, completely evading the scanner and enabling arbitrary code execution when the file is loaded. This is a compounded risk: organizations using picklescan as their primary security gate before loading ML models or datasets now operate under false assurance—the scanner approves files that will execute attacker-controlled code at load time. While no public exploit or KEV listing exists yet, the bypass technique is fully documented in the GHSA advisory and requires only moderate Python knowledge to reproduce. Patch to picklescan 0.0.29 immediately, re-scan all pickle files previously cleared by older versions, and evaluate migrating to safetensors as the default serialization format.
What is the risk?
High risk for any organization using picklescan as a mandatory security gate in ML artifact workflows. The vulnerability is a scanner evasion (CWE-502), not a flaw in pickle itself—meaning the danger is amplified by misplaced organizational trust in a tool now confirmed bypassable. CVSS 8.1 reflects network delivery, low complexity, and high confidentiality plus integrity impact. User interaction is required but loading a model is normal operational behavior in ML pipelines, not a meaningful barrier. No KEV listing or known weaponized exploit slightly reduces immediate urgency, but the advisory provides enough technical detail for motivated attackers to reproduce the bypass.
How does the attack unfold?
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| picklescan | pip | — | No patch |
Do you use picklescan? You're affected.
How severe is it?
What is the attack surface?
What should I do?
6 steps-
Upgrade picklescan to 0.0.29 or later immediately—this is the only direct fix.
-
Quarantine all pickle files previously approved by picklescan < 0.0.29 and re-scan with the patched version before loading.
-
Adopt safetensors as the default serialization format for model weights wherever possible—safetensors is inherently safe from deserialization attacks and should be preferred over pickle in all new workflows.
-
Where pickle is unavoidable, load files in an isolated sandbox (Docker container or VM) with no outbound network access, restricted filesystem mounts, and minimal process privileges.
-
Add runtime monitoring for unexpected subprocess spawning or outbound connections triggered during model load operations.
-
Audit shared model repositories and artifact stores for pickle files sourced externally.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2025-71376?
picklescan before 0.0.29 contains a detection gap that allows attackers to craft malicious pickle files using the `idlelib.autocomplete.AutoComplete.fetch_completions` reduce method, completely evading the scanner and enabling arbitrary code execution when the file is loaded. This is a compounded risk: organizations using picklescan as their primary security gate before loading ML models or datasets now operate under false assurance—the scanner approves files that will execute attacker-controlled code at load time. While no public exploit or KEV listing exists yet, the bypass technique is fully documented in the GHSA advisory and requires only moderate Python knowledge to reproduce. Patch to picklescan 0.0.29 immediately, re-scan all pickle files previously cleared by older versions, and evaluate migrating to safetensors as the default serialization format.
Is CVE-2025-71376 actively exploited?
No confirmed active exploitation of CVE-2025-71376 has been reported, but organizations should still patch proactively.
How to fix CVE-2025-71376?
1. Upgrade picklescan to 0.0.29 or later immediately—this is the only direct fix. 2. Quarantine all pickle files previously approved by picklescan < 0.0.29 and re-scan with the patched version before loading. 3. Adopt safetensors as the default serialization format for model weights wherever possible—safetensors is inherently safe from deserialization attacks and should be preferred over pickle in all new workflows. 4. Where pickle is unavoidable, load files in an isolated sandbox (Docker container or VM) with no outbound network access, restricted filesystem mounts, and minimal process privileges. 5. Add runtime monitoring for unexpected subprocess spawning or outbound connections triggered during model load operations. 6. Audit shared model repositories and artifact stores for pickle files sourced externally.
What systems are affected by CVE-2025-71376?
This vulnerability affects the following AI/ML architecture patterns: training pipelines, model serving, ML artifact distribution, Jupyter notebook environments, CI/CD model validation pipelines.
What is the CVSS score for CVE-2025-71376?
CVE-2025-71376 has a CVSS v3.1 base score of 8.1 (HIGH).
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0010.001 AI Software AML.T0011.000 Unsafe AI Artifacts AML.T0018.002 Embed Malware AML.T0107 Exploitation for Defense Evasion Compliance Controls Affected
What are the technical details?
Original Advisory
picklescan before 0.0.29 fails to detect malicious pickle files using idlelib.autocomplete.AutoComplete.fetch_completions in reduce methods. Attackers can embed undetected code in pickle files that executes arbitrary commands when loaded by victims.
Exploitation Scenario
An attacker targeting an ML engineering team publishes a seemingly useful fine-tuned model on a public repository (e.g., Hugging Face, GitHub, internal artifact store) in pickle format. The victim organization's CI/CD pipeline runs picklescan as a required security gate before promoting models to staging—an attacker-aware adversary has crafted the file using the `idlelib.autocomplete.AutoComplete.fetch_completions` reduce method specifically because it bypasses picklescan's detection logic. The scanner reports the file as clean, the pipeline promotes it, and a data scientist or automated training job loads it. Upon deserialization, the embedded payload executes—establishing a reverse shell, exfiltrating model weights and training data, or harvesting cloud API keys and database credentials present in the environment.
Weaknesses (CWE)
CWE-502 — Deserialization of Untrusted Data: The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.
- [Architecture and Design, Implementation] If available, use the signing/sealing features of the programming language to assure that deserialized data has not been tainted. For example, a hash-based message authentication code (HMAC) could be used to ensure that data has not been modified.
- [Implementation] When deserializing data, populate a new object rather than just deserializing. The result is that the data flows through safe input validation and that the functions are safe.
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N References
Timeline
Related Vulnerabilities
CVE-2026-3490 10.0 picklescan: blocklist bypass enables full RCE
Same package: picklescan GHSA-vvpj-8cmc-gx39 10.0 picklescan: security flaw enables exploitation
Same package: picklescan GHSA-g38g-8gr9-h9xp 9.8 picklescan: Allowlist Bypass evades input filtering
Same package: picklescan CVE-2025-1945 9.8 picklescan: ZIP flag bypass enables RCE in PyTorch models
Same package: picklescan GHSA-7wx9-6375-f5wh 9.8 picklescan: Allowlist Bypass evades input filtering
Same package: picklescan