CVE-2025-71325: picklescan: scanner bypass enables RCE via model files
CRITICAL PoC AVAILABLE CISA: ATTENDpicklescan before 0.0.27 contains a parsing logic error in its STACK_GLOBAL opcode handler that allows attackers to craft malicious pickle files which completely bypass security scanning. This is a defense-nullification vulnerability — teams relying on picklescan to vet ML model artifacts before loading them have no effective protection against malicious pickles exploiting this flaw. With a CVSS of 9.8 (network, no auth, no user interaction) and no public exploit yet, the window to patch before weaponization is narrow; the package has 68 historical CVEs indicating sustained adversary interest in this attack surface. Upgrade to picklescan 0.0.27 immediately, and consider migrating model serialization to safetensors as a structural fix that eliminates the pickle deserialization attack vector entirely.
What is the risk?
Critical. This vulnerability undermines a security control rather than attacking application logic directly, meaning the blast radius is invisible — pipelines believe they are protected when they are not. CVSS 9.8 reflects worst-case exploitability: network-reachable, no credentials required, no user interaction. The package has 68 prior CVEs indicating active adversarial research interest. Three formal downstream dependents are a floor; picklescan is frequently invoked directly in CI/CD scripts and ML pipelines without being a declared package dependency, extending real-world exposure significantly beyond what dependency graphs reveal.
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?
5 steps-
Upgrade picklescan to 0.0.27 immediately (patch commit 2a8383c).
-
Until patched, treat all picklescan scan results as untrusted — do not approve model artifacts solely on its output.
-
Migrate model serialization to safetensors format where feasible, eliminating the pickle deserialization attack surface structurally.
-
Run model loading in isolated sandboxes (containers with restricted outbound network and filesystem access) to limit blast radius if a malicious file executes.
-
Add behavioral monitoring for unexpected child process spawning or outbound connections during model load operations as a detection layer independent of picklescan.
What does CISA's SSVC say?
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2025-71325?
picklescan before 0.0.27 contains a parsing logic error in its STACK_GLOBAL opcode handler that allows attackers to craft malicious pickle files which completely bypass security scanning. This is a defense-nullification vulnerability — teams relying on picklescan to vet ML model artifacts before loading them have no effective protection against malicious pickles exploiting this flaw. With a CVSS of 9.8 (network, no auth, no user interaction) and no public exploit yet, the window to patch before weaponization is narrow; the package has 68 historical CVEs indicating sustained adversary interest in this attack surface. Upgrade to picklescan 0.0.27 immediately, and consider migrating model serialization to safetensors as a structural fix that eliminates the pickle deserialization attack vector entirely.
Is CVE-2025-71325 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2025-71325, increasing the risk of exploitation.
How to fix CVE-2025-71325?
1. Upgrade picklescan to 0.0.27 immediately (patch commit 2a8383c). 2. Until patched, treat all picklescan scan results as untrusted — do not approve model artifacts solely on its output. 3. Migrate model serialization to safetensors format where feasible, eliminating the pickle deserialization attack surface structurally. 4. Run model loading in isolated sandboxes (containers with restricted outbound network and filesystem access) to limit blast radius if a malicious file executes. 5. Add behavioral monitoring for unexpected child process spawning or outbound connections during model load operations as a detection layer independent of picklescan.
What systems are affected by CVE-2025-71325?
This vulnerability affects the following AI/ML architecture patterns: model serving, training pipelines, MLOps pipelines, CI/CD model validation, model artifact repositories.
What is the CVSS score for CVE-2025-71325?
CVE-2025-71325 has a CVSS v3.1 base score of 9.8 (CRITICAL). The EPSS exploitation probability is 0.47%.
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.27 contains a parsing logic error in the _list_globals function when handling STACK_GLOBAL opcodes, failing to track arguments in the correct range and allowing malicious pickle files to bypass detection. Attackers can craft pickle files with arguments at position zero to trigger unexpected exceptions and evade security scanning.
Exploitation Scenario
An adversary targeting a CI/CD pipeline that gates model promotion on picklescan approval crafts a malicious pickle file containing a reverse shell payload. The file uses STACK_GLOBAL opcodes with the malicious callable arguments placed at position zero — the specific pattern that exploits the argument range tracking bug and causes picklescan to skip detection of the malicious globals. The file clears the security scan, is promoted to the model registry as a trusted artifact, and is subsequently loaded by an automated inference service or a data scientist's workstation. On deserialization, the embedded payload executes with the host process privileges, establishing a foothold in the MLOps infrastructure or exfiltrating model weights, training data, and API credentials accessible to the loading process.
Weaknesses (CWE)
CWE-391 — Unchecked Error Condition: [PLANNED FOR DEPRECATION. SEE MAINTENANCE NOTES AND CONSIDER CWE-252, CWE-248, OR CWE-1069.] Ignoring exceptions and other error conditions may allow an attacker to induce unexpected behavior unnoticed.
- [Requirements] The choice between a language which has named or unnamed exceptions needs to be done. While unnamed exceptions exacerbate the chance of not properly dealing with an exception, named exceptions suffer from the up call version of the weak base class problem.
- [Requirements] A language can be used which requires, at compile time, to catch all serious exceptions. However, one must make sure to use the most current version of the API as new exceptions could be added.
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H 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