CVE-2025-71349: picklescan: bypass allows undetected pickle RCE
HIGH PoC AVAILABLE CISA: TRACK*picklescan versions before 0.0.29 fail to flag Python's built-in trace.Trace.run as a dangerous callable when scanning pickle files, so a maliciously crafted pickle using this function in its __reduce__ method sails through the scanner as "safe" and executes arbitrary code the moment pickle.load() processes it. This matters because picklescan is a widely-used safety gate for model registries and ML pipelines that ingest untrusted pickle-serialized artifacts (models, checkpoints, datasets), so a bypass here quietly defeats the exact control teams rely on to prevent supply-chain RCE from third-party models. Exploitation likelihood is currently low — EPSS sits at 0.56% (top 57th percentile), there's no public exploit or Nuclei template, and it's not in CISA KEV or SSVC-flagged — but the attack requires only user interaction (someone loading the file) with no privileges and low complexity, so it remains a credible risk anywhere pickle files from external or semi-trusted sources are scanned before use. Upgrade picklescan to 0.0.29 or later immediately; until patched, treat picklescan as a defense-in-depth layer rather than a sole gate, and prefer safetensors or explicit allowlisting of safe globals over pickle deserialization wherever feasible.
What is the risk?
Moderate risk overall: network attack vector with low complexity and no privileges required lowers the bar for exploitation, but the requirement for user interaction (victim must load the malicious pickle) and current absence of public exploits, scanner templates, or KEV/SSVC flags keep near-term exploitation likelihood low (EPSS 0.56%, top 57th percentile). The real severity driver is context — this is a bypass of a security control itself, meaning organizations that trust picklescan's clean verdict as sufficient assurance for third-party model/artifact ingestion carry silent risk until patched. CVSS 8.1 (high) reflects the full compromise (C:H/I:H) achievable via arbitrary code execution once the crafted pickle is loaded.
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?
1 step-
Upgrade picklescan to version 0.0.29 or later immediately in any pipeline that uses it as a pickle-safety gate. Until upgraded, do not treat a clean picklescan result as sufficient — combine it with format migration to safetensors (which avoids arbitrary deserialization entirely) or restrict pickle loading to fully trusted, internally-generated artifacts only. Where pickle files from external sources must be accepted, run detonation in an isolated sandbox and monitor for unexpected child processes or network calls triggered during deserialization. Audit CI/CD and model-registry integrations for hardcoded trust in picklescan's verdict and add a secondary control (e.g., restricted unpickler with explicit safe-class allowlist) as defense-in-depth.
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-71349?
picklescan versions before 0.0.29 fail to flag Python's built-in trace.Trace.run as a dangerous callable when scanning pickle files, so a maliciously crafted pickle using this function in its __reduce__ method sails through the scanner as "safe" and executes arbitrary code the moment pickle.load() processes it. This matters because picklescan is a widely-used safety gate for model registries and ML pipelines that ingest untrusted pickle-serialized artifacts (models, checkpoints, datasets), so a bypass here quietly defeats the exact control teams rely on to prevent supply-chain RCE from third-party models. Exploitation likelihood is currently low — EPSS sits at 0.56% (top 57th percentile), there's no public exploit or Nuclei template, and it's not in CISA KEV or SSVC-flagged — but the attack requires only user interaction (someone loading the file) with no privileges and low complexity, so it remains a credible risk anywhere pickle files from external or semi-trusted sources are scanned before use. Upgrade picklescan to 0.0.29 or later immediately; until patched, treat picklescan as a defense-in-depth layer rather than a sole gate, and prefer safetensors or explicit allowlisting of safe globals over pickle deserialization wherever feasible.
Is CVE-2025-71349 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2025-71349, increasing the risk of exploitation.
How to fix CVE-2025-71349?
Upgrade picklescan to version 0.0.29 or later immediately in any pipeline that uses it as a pickle-safety gate. Until upgraded, do not treat a clean picklescan result as sufficient — combine it with format migration to safetensors (which avoids arbitrary deserialization entirely) or restrict pickle loading to fully trusted, internally-generated artifacts only. Where pickle files from external sources must be accepted, run detonation in an isolated sandbox and monitor for unexpected child processes or network calls triggered during deserialization. Audit CI/CD and model-registry integrations for hardcoded trust in picklescan's verdict and add a secondary control (e.g., restricted unpickler with explicit safe-class allowlist) as defense-in-depth.
What systems are affected by CVE-2025-71349?
This vulnerability affects the following AI/ML architecture patterns: model serving, training pipelines, MLOps/model registries, supply chain / artifact ingestion.
What is the CVSS score for CVE-2025-71349?
CVE-2025-71349 has a CVSS v3.1 base score of 8.1 (HIGH). The EPSS exploitation probability is 0.56%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0010.001 AI Software AML.T0011.000 Unsafe AI Artifacts AML.T0018.002 Embed Malware AML.T0076 Corrupt AI Model Compliance Controls Affected
What are the technical details?
Original Advisory
picklescan before 0.0.29 fails to detect the built-in trace.Trace.run function when analyzing pickle files, allowing attackers to embed undetected malicious code. Remote attackers can craft malicious pickle files using trace.Trace.run in the reduce method to achieve arbitrary code execution when pickle.load processes the file.
Exploitation Scenario
An adversary publishes a poisoned model checkpoint to a public model hub or sends it directly to a target organization, embedding a pickle __reduce__ method that invokes trace.Trace.run with attacker-controlled arguments to execute a shell command. The victim's ML pipeline runs picklescan as a pre-ingestion safety check; because trace.Trace.run isn't on picklescan's dangerous-function denylist, the file is marked safe and passed through. A data scientist or automated pipeline step then calls pickle.load() on the file — for example when loading a "vetted" model checkpoint into a training or inference environment — triggering arbitrary code execution on the host, potentially leading to credential theft, lateral movement, or further supply-chain poisoning of models produced downstream.
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 References
Timeline
Related Vulnerabilities
CVE-2026-3490 10.0 picklescan: blocklist bypass enables full RCE
Same package: picklescan GHSA-vvpj-8cmc-gx39 10.0 picklescan: security flaw enables exploitation
Same package: picklescan GHSA-g38g-8gr9-h9xp 9.8 picklescan: Allowlist Bypass evades input filtering
Same package: picklescan CVE-2025-1945 9.8 picklescan: ZIP flag bypass enables RCE in PyTorch models
Same package: picklescan GHSA-7wx9-6375-f5wh 9.8 picklescan: Allowlist Bypass evades input filtering
Same package: picklescan