Skip to main content

picklescan CVE-2025-71321

CRITICAL
Deserialization of Untrusted Data (CWE-502)
2026-06-17 VulnCheck
9.3
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft pickle with distutils.file_util.write_file reduce
  2. Delivery
    Publish poisoned model to hub or send to victim
  3. Exploit
    Victim runs picklescan which returns safe
  4. Execution
    Victim unpickles model in pipeline
  5. Persist
    write_file overwrites authorized_keys or config
  6. Impact
    Achieve persistence or RCE

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 the target environment to (1) use picklescan < 0.0.33 as its pickle-safety scanner, (2) treat a clean picklescan result as authorization to load the file, and (3) subsequently unpickle an attacker-supplied pickle, model, or .pkl artifact in a process with write permission to the file the attacker wants to overwrite. The bypass relies on distutils.file_util.write_file being importable in the unpickling Python (distutils is deprecated and removed in Python 3.12+, so victims on 3.12 without a distutils shim are not exploitable via this exact primitive). No authentication or user interaction with picklescan itself is needed, but the picklescan project is a developer tool - exposure depends on whether downstream consumers actually load the scanned pickle.

Impact

The CVSS 4.0 score of 9.3 (AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H) reflects network-reachable, no-auth, no-interaction exploitation with high impact on the host that consumes the pickle - appropriate for the ML supply-chain context where users routinely download community models. However, the realistic risk is narrower than the raw score suggests: exploitation requires the victim to (a) use picklescan as their safety check and (b) subsequently unpickle the file the scanner blessed, so the vulnerability is a scanner-bypass, not a direct RCE against picklescan itself. A working PoC is published in the GHSA advisory, but there is no public exploit identified at time of analysis indicating active exploitation and the CVE is not on CISA KEV; no EPSS score is provided in the input. The primary worry is supply-chain - malicious models on Hugging Face / model hubs that defeat picklescan-based gating used by MLOps pipelines.

Exploit ScenarioDerived

An attacker publishes a poisoned PyTorch or scikit-learn model to a public model hub; the victim's MLOps pipeline runs picklescan against the .pkl/.bin file, which reports no dangerous calls because distutils is not on the blocklist. When the pipeline subsequently torch.loads or pickle.loads the model, the embedded __reduce__ invokes distutils.file_util.write_file to overwrite ~/.ssh/authorized_keys or a web server config, yielding persistence and remote code execution as documented by the published PoC in the GHSA advisory.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.6% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 17, 2026

Arbitrary file write in picklescan before 0.0.33 lets attackers bypass the tool's dangerous-call blocklist by abusing distutils.file_util.write_file inside crafted pickle payloads. Because picklescan is used as a safety gate before loading ML model pickles, a bypass means malicious models pass scanning and can overwrite files on disk to achieve denial of service or remote code execution. Publicly available exploit code exists in the GHSA advisory, though there is no public exploit identified at time of analysis indicating active exploitation.

RemediationAI

Vendor-released patch: upgrade picklescan to 0.0.33 or later (pip install --upgrade picklescan), which adds distutils to the dangerous globals list per the upstream fix in https://github.com/mmaitre314/picklescan/pull/53 and commit 70c1c6c31beb6baaf52c8db1b6c3c0e84a6f9dab; see the advisory at https://github.com/mmaitre314/picklescan/security/advisories/GHSA-m273-6v24-x4m4. Where immediate upgrade is not possible, supplement scanning by extending your own denylist to include distutils.file_util.write_file (and audit for other writable callables such as os.* and pathlib writes), or refuse to unpickle any model from untrusted sources and prefer safetensors-format weights instead - the trade-off is that legitimate distutils-using pickles will be blocked and migrating off pickle requires re-saving models. Treat picklescan as one defense layer only and sandbox the unpickling process (separate user, read-only filesystem, no SSH key access) so that even an arbitrary write cannot reach .ssh/authorized_keys or webroot config.

Affected Packages

pypi picklescan fix: 0.0.33

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 library used to statically inspect pickle files (commonly Hugging Face / PyTorch model artifacts) for dangerous opcodes and imports before unpickling. It maintains a denylist of known-bad callables such as builtins.open and shutil.* that can be used to write or overwrite files via pickle's __reduce__ mechanism. The root cause is CWE-502 (Deserialization of Untrusted Data) compounded by an incomplete blocklist: distutils.file_util.write_file performs the same arbitrary file write primitive but was not enumerated, so a __reduce__ returning (distutils.file_util.write_file, (path, lines)) is reported as safe by the scanner and then writes attacker-controlled content when the consuming application loads the pickle. The affected component is cpe:2.3:a:picklescan:picklescan:* up to 0.0.32.

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

Vendor (VulnCheck) PRIMARY 9.3 CRITICAL
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
vuln.today AI 8.8 HIGH

Payload is delivered network-wide (e.g., model hub) but the victim must choose to scan-then-load an attacker-supplied pickle, so UI:R; no auth needed and impact is full host compromise.

3.1 AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

picklescan before 0.0.33 contains an arbitrary file writing vulnerability that allows attackers to bypass the dangerous blocklist by using distutils.file_util.write_file. Attackers can construct malicious pickle objects to overwrite critical system files and achieve denial of service or remote code execution.

Executive ViewAI

Why It Matters

picklescan, a security gating tool for machine learning model validation, contains an arbitrary file write vulnerability (CVE-2025-71321, CVSS 9.3) that allows attackers to bypass safety controls and achieve remote code execution. Organizations using picklescan to validate untrusted ML models face critical risk of supply-chain compromise and system takeover. With publicly available exploit code and no vendor patch currently available, immediate action is required across all affected deployments.

Business Impact: Severe
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) Eliminate pickle deserialization-migrate ML models to ONNX, TorchScript, or SafeTensors format; (2) Restrict model loading to internal, manually-reviewed repositories; (3) Implement application-level file system access controls to prevent write operations by model-loading processes; (4) Network-segment ML infrastructure from critical business systems to limit lateral movement from compromised loaders.

Threat Intelligence Overview

EPSS Score
0.6%
Top 55% exploitable
Social Media
1
Sightings
Data Quality
5 sources
Confidence: Medium

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.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.6%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Out-of-Cycle
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact
Very High
Technical Impact
Total

Priority Score

47
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +46
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

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.

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

Affected Products (CPE)CVE.org

cpe:2.3:a:picklescan:picklescan:*:*:*:*:*:*:*:*
CVE-2026-3490 CRITICAL POC
10.0 Jun 17

Remote code execution against users of picklescan versions prior to 1.0.4 is achievable by smuggling any blocked functio

CVE-2025-10156 CRITICAL POC
9.3 Sep 17

An Improper Handling of Exceptional Conditions vulnerability in the ZIP archive scanning component of mmaitre314 pickles

CVE-2025-10157 CRITICAL POC
9.3 Sep 17

A Protection Mechanism Failure vulnerability in mmaitre314 picklescan versions up to and including 0.0.30 allows a remot

CVE-2025-10155 CRITICAL POC
9.3 Sep 17

An Improper Input Validation vulnerability in the scanning logic of mmaitre314 picklescan versions up to and including 0

CVE-2025-71341 HIGH POC
7.6 Jun 23

Detection bypass in picklescan prior to 0.0.29 allows attackers to smuggle remote code execution payloads through pickle

CVE-2025-71351 HIGH POC
7.6 Jun 21

Detection bypass in picklescan versions before 0.0.25 allows attackers to embed remote code execution payloads in pickle

CVE-2025-71370 HIGH POC
7.6 Jun 23

Detection bypass in picklescan before 0.0.28 allows attackers to embed malicious torch.jit.unsupported_tensor_ops.execWr

CVE-2025-71348 HIGH POC
7.6 Jun 21

Detection bypass in picklescan before 0.0.28 allows attackers to smuggle arbitrary code through pickle files by abusing

CVE-2025-71361 HIGH POC
7.6 Jun 24

Detection bypass in picklescan before 0.0.29 allows malicious pickle files to evade scanning by abusing the undetected i

CVE-2025-71378 HIGH POC
7.6 Jun 21

Detection bypass in picklescan versions before 0.0.30 allows malicious pickle files to evade security scanning by using

CVE-2025-71376 HIGH POC
7.6 Jun 23

Detection bypass in picklescan versions prior to 0.0.29 allows attackers to smuggle arbitrary code execution payloads th

CVE-2025-71365 HIGH POC
7.6 Jun 23

Detection bypass in picklescan before 0.0.33 allows attackers to smuggle arbitrary code through malicious pickle files b

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy