CVE-2025-71325: picklescan: scanner bypass enables RCE via model files
CRITICALPoC AVAILABLECISA: 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 stepsUpgrade 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.60%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0010.001AI SoftwareAML.T0011.000Unsafe AI ArtifactsAML.T0018.002Embed MalwareAML.T0107Exploitation for Defense EvasionCompliance 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 — DEPRECATED: Unchecked Error Condition: This entry has been deprecated because it used ambiguous terminology and incorporated and confused multiple weaknesses. See Mapping Notes for other recommendations, and see Maintenance Notes for more detailed explanations.
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HReferences
Timeline
Related Vulnerabilities
CVE-2026-349010.0picklescan: blocklist bypass enables full RCE
Same package: picklescanGHSA-vvpj-8cmc-gx3910.0picklescan: security flaw enables exploitation
Same package: picklescanGHSA-g38g-8gr9-h9xp9.8picklescan: Allowlist Bypass evades input filtering
Same package: picklescanCVE-2025-19459.8picklescan: ZIP flag bypass enables RCE in PyTorch models
Same package: picklescanGHSA-7wx9-6375-f5wh9.8picklescan: Allowlist Bypass evades input filtering
Same package: picklescan