Skip to main content

PickleScan CVE-2025-71322

HIGH
Protection Mechanism Failure (CWE-693)
2026-06-17 VulnCheck
8.7
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 pty.spawn GLOBAL opcode
  2. Delivery
    Publish malicious model to hub or send to victim
  3. Exploit
    PickleScan flags as 'suspicious' not 'dangerous'
  4. Execution
    Victim or pipeline proceeds to load model
  5. Persist
    torch.load triggers pty.spawn(/bin/sh)
  6. Impact
    Attacker obtains shell as loading user

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V15 - Secure Coding and Architecture Protection mechanism completeness
Exploitation Conditions

Exploitation requires that (1) a victim user, CI job, or platform service runs PickleScan on an attacker-supplied pickle/PyTorch/ZIP file and acts on its 'safe' verdict, and (2) the file is subsequently deserialized (e.g., via pickle.load or torch.load) so that the embedded pty.spawn opcode actually fires - code execution does not occur at scan time, only at load time. The CVSS 4.0 UI:P indicates passive user interaction (downloading and loading a model is sufficient; no active click-through is needed). Limiting factors: the victim system must have a POSIX pty module available (the attack does not work on stock Windows Python because pty is Unix-only), and the bypass only matters where PickleScan is the gatekeeper - environments that already refuse pickle deserialization or use safetensors are unaffected.

Impact

The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N) scores 8.7 High: network reach, no privileges, but passive user interaction is required - a victim must download and load the malicious pickle/model. This matches the realistic threat model for ML supply-chain attacks, where users routinely download community models from public hubs and trust scanners like PickleScan to flag them. A working proof-of-concept is publicly available from the HeroCTF 2025 writeup and solve script, increasing weaponization likelihood; however, the CVE is not listed in CISA KEV and EPSS data was not provided, so widespread in-the-wild exploitation is not confirmed. The combination of public POC, low complexity, and a trust-relationship bypass (the scanner gives a false sense of safety) makes this a meaningful priority for anyone running PickleScan in CI or model-ingest workflows, even though the raw CVSS score alone might understate the supply-chain blast radius.

Exploit ScenarioDerived

An attacker uploads a backdoored PyTorch model to a public model hub; the embedded pickle uses the GLOBAL opcode to reference pty.spawn(['/bin/sh']). When a data scientist or an automated MLOps pipeline runs picklescan over the file (or a hub's ingest scanner does so), the scanner flags pty.spawn only as 'suspicious' and lets the artifact through; the subsequent torch.load call then spawns a shell under the loading user's identity. The HeroCTF 2025 solve script provides a working POC pickle generator.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.4% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Jun 17, 2026

Security check bypass in PickleScan versions before 0.0.33 allows attackers to smuggle arbitrary code execution payloads past the scanner by invoking the pty.spawn function, which was omitted from the unsafe globals deny-list. Publicly available exploit code exists (released as part of the HeroCTF 2025 'Irreductible 2' challenge writeup), and the flaw is particularly impactful for platforms like Hugging Face and other ML pipelines that rely on PickleScan to vet PyTorch model files. No public exploit identified at time of analysis in CISA KEV.

RemediationAI

Vendor-released patch: upgrade picklescan to 0.0.33 or later (pip install --upgrade picklescan), which adds pty.spawn to the dangerous-globals list per upstream PR https://github.com/mmaitre314/picklescan/pull/53 and commit 70c1c6c31beb6baaf52c8db1b6c3c0e84a6f9dab. Operators of model-hosting platforms should rebuild and redeploy any container images or services that pin an older picklescan version, and re-scan recently uploaded models with the fixed scanner since previously cleared artifacts may still contain pty.spawn payloads. As compensating controls until the upgrade is rolled out, refuse to deserialize pickle-based model formats and require safer alternatives such as safetensors, or load untrusted models inside a sandboxed/unprivileged container with no shell available on PATH (which neutralises pty.spawn's /bin/sh invocation) - note that the sandbox approach still permits other unsafe globals not covered by this CVE, so it is not a substitute for the patch.

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 static analysis tool maintained by mmaitre314 that inspects Python pickle streams (commonly embedded inside PyTorch .pt/.bin files and ZIP archives) for references to dangerous globals such as os.system, subprocess.Popen, or eval that would execute code when the pickle is deserialized. The tool relies on an allow/deny list of module-function pairs; CWE-693 (Protection Mechanism Failure) applies because the denylist was incomplete - the standard-library pty module's spawn() function, which internally invokes os.execlp on its first argument, was classified merely as 'suspicious' rather than 'dangerous'. An attacker can therefore hand-craft a pickle stream using the GLOBAL opcode to reference pty.spawn with arguments like ['/bin/sh'], and when the pickle is unpickled (e.g., via torch.load) the spawn call yields an interactive shell under the loading process. The CPE cpe:2.3:a:picklescan:picklescan:*:*:* indicates all versions prior to the fix are affected.

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 8.7 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
vuln.today AI 8.8 HIGH

Malicious pickle is delivered over the network and requires the victim to load the file (UI:R); no prior auth or privileges are needed, and pickle deserialization yields full code execution (C/I/A:H).

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
Passive
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 fails to include the pty.spawn function in its unsafe globals list, allowing attackers to bypass security checks. Malicious actors can craft pickle payloads using pty.spawn to achieve arbitrary code execution when files are processed by PickleScan.

Executive ViewAI

Why It Matters

PickleScan, a widely-used security scanner for machine learning model files, contains a code-execution bypass in versions before 0.0.33 that allows attackers to inject malicious payloads past security checks. Publicly available exploit code exists, and organizations on Hugging Face and similar platforms that depend on PickleScan to vet untrusted models now face immediate risk of supply-chain compromise.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) Execute all model inference in isolated sandboxed environments with minimal system privileges; (2) Require cryptographic verification that models are signed by trusted authors only; (3) Restrict model ingestion to internal curated repositories until patch available; (4) Deploy runtime monitoring for anomalous spawning of system processes or network connections during model inference; (5) Conduct manual security code review of any new or updated models from external sources prior to deployment.

Threat Intelligence Overview

EPSS Score
0.4%
Top 70% 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 HIGH
CISA KEV No
Public POC No
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
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
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

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

Attack Technique

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

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