CVE-2025-71350: picklescan: scanner bypass enables pickle RCE

HIGH PoC AVAILABLE CISA: ATTEND
Published June 30, 2026
CISO Take

picklescan, a widely-used tool for scanning pickle files for malicious code before they're loaded into ML pipelines, fails to detect payloads that abuse the torch.utils.collect_env.run function inside a pickle's __reduce__ method, letting a crafted file execute arbitrary commands the moment it's deserialized. This matters less because of raw exploit probability — EPSS sits at 0.395% (top 68th percentile, no public PoC, no Nuclei template, not in CISA KEV) — and more because of what fails silently: teams that rely on picklescan as their safety gate before torch.load() will get a false 'clean' verdict on a genuinely malicious model file, defeating the exact control meant to catch this. The CVSS 8.1 (C:H/I:H) reflects that once a victim opens the file, full confidentiality and integrity compromise follows with no additional barriers beyond user interaction. Upgrade picklescan to 0.0.28+ immediately, and treat any picklescan-only gate as insufficient — pair it with format migration to safetensors or sandboxed/isolated loading for any pickle-based artifact from an untrusted source.

Sources: NVD EPSS GitHub Advisory ATLAS

What is the risk?

CVSS 8.1 (network, low complexity, no privileges, user interaction required) reflects high confidentiality and integrity impact with no availability impact — consistent with arbitrary command execution triggered on deserialization rather than a crash. Actual exploitation likelihood is currently low: EPSS is 0.395% and there is no public exploit code or scanner template, and the CVE is not in CISA KEV. The real risk driver is not active exploitation but false assurance — this is a bypass of a security control itself, so organizations that treat 'picklescan passed' as sufficient clearance for loading a pickle file are exposed without knowing it. Risk should be rated high for any pipeline that gates untrusted model/artifact ingestion solely on picklescan, and low-to-moderate otherwise.

How does the attack unfold?

Craft malicious artifact
Attacker builds a pickle file whose __reduce__ method invokes torch.utils.collect_env.run with an attacker-controlled command, designed to evade picklescan's detection heuristics.
AML.T0018.002
Distribute as trusted model
Attacker publishes or sends the file as a legitimate-looking model checkpoint via a hub, repository, or direct share.
AML.T0011.001
Scan evasion and load
Victim's pipeline scans the file with vulnerable picklescan (<0.0.28), which reports it clean, and proceeds to deserialize it via torch.load().
AML.T0011
Code execution
Deserialization triggers the embedded reduce method, executing the attacker's command and granting remote code execution on the victim's system.
AML.T0050

What systems are affected?

Package Ecosystem Vulnerable Range Patched
picklescan pip No patch
418 3 dependents Pushed 25d ago 53% patched ~12d to patch Full package profile →
PyTorch pip No patch
102.4K OpenSSF 6.4 24.6K dependents Pushed 2d ago 13% patched ~256d to patch Full package profile →

How severe is it?

CVSS 3.1
8.1 / 10
EPSS
0.4%
chance of exploitation in 30 days
Higher than 33% of all CVEs
Exploitation Status
Exploit Available
Exploitation: MEDIUM
Sophistication
Advanced
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 Required
S Unchanged
C High
I High
A None

What should I do?

1 step
  1. Upgrade picklescan to version 0.0.28 or later immediately across all CI/CD and ingestion pipelines that use it as an artifact gate. Do not treat picklescan as a sole control — prefer safetensors or other non-executable serialization formats for model storage/distribution wherever possible. For pipelines that must accept pickle files, load them in an isolated/sandboxed environment (containers with no network egress, minimal privileges, no access to secrets) regardless of scanner verdict. Layer detection: combine picklescan with fickling or manual review of opcode streams for known-dangerous reduce targets, and monitor for outbound connections or subprocess spawns immediately following model-load events as a detection signal.

What does CISA's SSVC say?

Decision Attend
Exploitation poc
Automatable No
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:

ISO 42001
A.6.2 - Third-party and supplier relationships
NIST AI RMF
MAP 5.1 - Third-party AI resource risks are mapped
OWASP LLM Top 10
LLM03 - Supply Chain Vulnerabilities

Frequently Asked Questions

What is CVE-2025-71350?

picklescan, a widely-used tool for scanning pickle files for malicious code before they're loaded into ML pipelines, fails to detect payloads that abuse the torch.utils.collect_env.run function inside a pickle's __reduce__ method, letting a crafted file execute arbitrary commands the moment it's deserialized. This matters less because of raw exploit probability — EPSS sits at 0.395% (top 68th percentile, no public PoC, no Nuclei template, not in CISA KEV) — and more because of what fails silently: teams that rely on picklescan as their safety gate before torch.load() will get a false 'clean' verdict on a genuinely malicious model file, defeating the exact control meant to catch this. The CVSS 8.1 (C:H/I:H) reflects that once a victim opens the file, full confidentiality and integrity compromise follows with no additional barriers beyond user interaction. Upgrade picklescan to 0.0.28+ immediately, and treat any picklescan-only gate as insufficient — pair it with format migration to safetensors or sandboxed/isolated loading for any pickle-based artifact from an untrusted source.

Is CVE-2025-71350 actively exploited?

Proof-of-concept exploit code is publicly available for CVE-2025-71350, increasing the risk of exploitation.

How to fix CVE-2025-71350?

Upgrade picklescan to version 0.0.28 or later immediately across all CI/CD and ingestion pipelines that use it as an artifact gate. Do not treat picklescan as a sole control — prefer safetensors or other non-executable serialization formats for model storage/distribution wherever possible. For pipelines that must accept pickle files, load them in an isolated/sandboxed environment (containers with no network egress, minimal privileges, no access to secrets) regardless of scanner verdict. Layer detection: combine picklescan with fickling or manual review of opcode streams for known-dangerous reduce targets, and monitor for outbound connections or subprocess spawns immediately following model-load events as a detection signal.

What systems are affected by CVE-2025-71350?

This vulnerability affects the following AI/ML architecture patterns: training pipelines, model serving, MLOps/model registries.

What is the CVSS score for CVE-2025-71350?

CVE-2025-71350 has a CVSS v3.1 base score of 8.1 (HIGH). The EPSS exploitation probability is 0.40%.

What is the AI security impact?

Affected AI Architectures

training pipelinesmodel servingMLOps/model registries

MITRE ATLAS Techniques

AML.T0010.001 AI Software
AML.T0011 User Execution
AML.T0011.000 Unsafe AI Artifacts
AML.T0018.002 Embed Malware
AML.T0050 Command and Scripting Interpreter

Compliance Controls Affected

ISO 42001: A.6.2
NIST AI RMF: MAP 5.1
OWASP LLM Top 10: LLM03

What are the technical details?

Original Advisory

picklescan before 0.0.28 fails to detect malicious pickle files using torch.utils.collect_env.run function in reduce methods. Attackers can embed undetected code in pickle files that executes remote commands when loaded by victims.

Exploitation Scenario

An attacker crafts a malicious PyTorch checkpoint whose pickle stream embeds a __reduce__ call that invokes torch.utils.collect_env.run with an attacker-controlled command string, then uploads it to a model-sharing platform or sends it directly to a target research team disguised as a legitimate fine-tuned checkpoint. The victim's ingestion pipeline runs picklescan (pre-0.0.28) as a safety gate; because the payload rides on a legitimate torch utility function rather than a known-dangerous builtin, the scanner reports the file clean. A data scientist or automated pipeline then calls torch.load() on the 'verified' file, triggering deserialization, which executes the embedded command and grants the attacker code execution on the host running the ML workload — potentially a training server, inference node, or CI runner with access to credentials, other models, or internal networks.

Weaknesses (CWE)

CWE-502 — Deserialization of Untrusted Data: The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.

  • [Architecture and Design, Implementation] If available, use the signing/sealing features of the programming language to assure that deserialized data has not been tainted. For example, a hash-based message authentication code (HMAC) could be used to ensure that data has not been modified.
  • [Implementation] When deserializing data, populate a new object rather than just deserializing. The result is that the data flows through safe input validation and that the functions are safe.

Source: MITRE CWE corpus.

CVSS Vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N

Timeline

Published
June 30, 2026
Last Modified
July 1, 2026
First Seen
June 30, 2026

Related Vulnerabilities