CVE-2025-71325: picklescan: scanner bypass enables RCE via model files

CRITICAL PoC AVAILABLE CISA: ATTEND
Published June 17, 2026
CISO Take

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.

Sources: NVD GitHub Advisory VulnCheck ATLAS

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?

Craft Malicious Artifact
Adversary creates a pickle file embedding a malicious callable using STACK_GLOBAL opcodes with arguments placed at position zero, exploiting the off-by-one argument range tracking bug in picklescan's _list_globals function.
AML.T0011.000
Bypass Security Scanner
The crafted pickle is submitted to a pipeline guarded by picklescan; the parser fails to detect the malicious globals due to the argument range flaw, and the file is marked clean and approved for promotion.
AML.T0107
Artifact Promotion
The approved malicious pickle enters the model registry or is distributed to team members as a trusted model artifact, reaching production inference services or developer workstations.
AML.T0018.002
Code Execution on Host
On deserialization during model load, the embedded payload executes with host process privileges, enabling reverse shell establishment, credential exfiltration, or persistent access to MLOps infrastructure.
AML.T0072

What systems are affected?

Package Ecosystem Vulnerable Range Patched
picklescan pip No patch
420 3 dependents Pushed 9d ago 53% patched ~12d to patch Full package profile →

Do you use picklescan? You're affected.

How severe is it?

CVSS 3.1
9.8 / 10
EPSS
0.5%
chance of exploitation in 30 days
Higher than 39% of all CVEs
Exploitation Status
Exploit Available
Exploitation: MEDIUM
Sophistication
Moderate
Exploitation Confidence
medium
CISA SSVC: Public PoC
Public PoC indexed (trickest/cve)
Composite signal derived from CISA KEV, VulnCheck KEV, CISA SSVC, EPSS, Metasploit, Exploit-DB, trickest/cve, Nuclei templates, and inthewild.io exploitation reports.

What is the attack surface?

AV AC PR UI S C I A
AV Network
AC Low
PR None
UI None
S Unchanged
C High
I High
A High

What should I do?

5 steps
  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 does CISA's SSVC say?

Decision Attend
Exploitation poc
Automatable Yes
Technical Impact total

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:

EU AI Act
Article 15 - Accuracy, robustness and cybersecurity Article 9 - Risk management system
ISO 42001
6.1.2 - AI risk assessment 8.4 - AI system operation
NIST AI RMF
GOVERN-6.1 - Policies and procedures for AI supply chain risk
OWASP LLM Top 10
LLM03:2025 - Supply Chain

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

model servingtraining pipelinesMLOps pipelinesCI/CD model validationmodel artifact repositories

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

EU AI Act: Article 15, Article 9
ISO 42001: 6.1.2, 8.4
NIST AI RMF: GOVERN-6.1
OWASP LLM Top 10: LLM03:2025

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

Timeline

Published
June 17, 2026
Last Modified
June 17, 2026
First Seen
June 17, 2026

Related Vulnerabilities