CVE-2025-71343: picklescan: scanner bypass lets malicious pickle files evade detection
HIGH CISA: ATTENDpicklescan is the de facto scanning tool many ML teams and model hubs rely on to vet pickle-based model files before deserializing them, and this flaw lets a specially crafted pickle file abuse an internal lib2to3 parser function to slip malicious opcodes past that scan undetected. That matters because picklescan's entire value proposition is catching exactly this kind of payload before pickle.load() executes it — a bypass here means any pipeline that treats a 'clean' scan result as a green light is exposed to arbitrary code execution with no privileges required, contingent only on a user or automated job loading the file. There is no CISA KEV listing, no public exploit code, and EPSS sits at just 0.003 (though that still places it in the top 78th percentile for predicted exploitation), so this looks like a disclosed weakness rather than an active campaign — but the CVSS 8.1 score reflects how much damage a successful bypass causes once triggered. Any team using picklescan below 0.0.30 as a gate for third-party or Hugging-Face-sourced models should upgrade immediately and, longer term, stop treating scanner clearance as sufficient on its own.
What is the risk?
High severity (CVSS 8.1) driven by full confidentiality and integrity loss on successful exploitation, but real-world risk is currently moderate: exploitation requires an attacker to craft a working lib2to3-based bypass and get a victim or automated pipeline to run pickle.load() on the resulting file (UI:R). No CISA KEV entry, no public exploit, and no Nuclei template exist yet, and EPSS (0.003) is low in absolute terms despite the 78th-percentile ranking. The systemic risk is larger than the raw score suggests: any organization using picklescan as its sole control against malicious pickle-based model files has effectively zero protection against this specific bypass class until patched.
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 >= 0.0.30 immediately in any pipeline or CI job that performs pre-load scanning of pickle files. Until patched, do not treat a 'clean' picklescan result as sufficient assurance — add defense in depth: load untrusted pickle files only inside an isolated/sandboxed environment (container with no network access or credentials, or a restricted subprocess), and prefer safetensors or other non-executable serialization formats for models sourced from third parties. For detection, monitor for pickle.load() calls immediately following model downloads from external sources, and audit models already ingested via picklescan-gated pipelines prior to this patch for anomalous lib2to3/pgen-related opcodes or unexpected REDUCE opcodes referencing uncommon modules.
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-71343?
picklescan is the de facto scanning tool many ML teams and model hubs rely on to vet pickle-based model files before deserializing them, and this flaw lets a specially crafted pickle file abuse an internal lib2to3 parser function to slip malicious opcodes past that scan undetected. That matters because picklescan's entire value proposition is catching exactly this kind of payload before pickle.load() executes it — a bypass here means any pipeline that treats a 'clean' scan result as a green light is exposed to arbitrary code execution with no privileges required, contingent only on a user or automated job loading the file. There is no CISA KEV listing, no public exploit code, and EPSS sits at just 0.003 (though that still places it in the top 78th percentile for predicted exploitation), so this looks like a disclosed weakness rather than an active campaign — but the CVSS 8.1 score reflects how much damage a successful bypass causes once triggered. Any team using picklescan below 0.0.30 as a gate for third-party or Hugging-Face-sourced models should upgrade immediately and, longer term, stop treating scanner clearance as sufficient on its own.
Is CVE-2025-71343 actively exploited?
No confirmed active exploitation of CVE-2025-71343 has been reported, but organizations should still patch proactively.
How to fix CVE-2025-71343?
Upgrade picklescan to >= 0.0.30 immediately in any pipeline or CI job that performs pre-load scanning of pickle files. Until patched, do not treat a 'clean' picklescan result as sufficient assurance — add defense in depth: load untrusted pickle files only inside an isolated/sandboxed environment (container with no network access or credentials, or a restricted subprocess), and prefer safetensors or other non-executable serialization formats for models sourced from third parties. For detection, monitor for pickle.load() calls immediately following model downloads from external sources, and audit models already ingested via picklescan-gated pipelines prior to this patch for anomalous lib2to3/pgen-related opcodes or unexpected REDUCE opcodes referencing uncommon modules.
What systems are affected by CVE-2025-71343?
This vulnerability affects the following AI/ML architecture patterns: model serving, MLOps pipelines, model registries/hubs, training pipelines.
What is the CVSS score for CVE-2025-71343?
CVE-2025-71343 has a CVSS v3.1 base score of 8.1 (HIGH). The EPSS exploitation probability is 0.30%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0010.003 Model AML.T0011.000 Unsafe AI Artifacts AML.T0018.002 Embed Malware AML.T0058 Publish Poisoned Models Compliance Controls Affected
What are the technical details?
Original Advisory
picklescan before 0.0.30 fails to detect malicious pickle files that exploit lib2to3.pgen2.pgen.ParserGenerator.make_label function in the reduce method. Attackers can craft malicious pickle files with embedded code that evades detection but executes arbitrary commands when pickle.load() is called.
Exploitation Scenario
An attacker publishes a trojanized model checkpoint to a public model hub or supply-chain-adjacent repository, embedding a malicious __reduce__ payload that abuses lib2to3.pgen2.pgen.ParserGenerator.make_label to structure the pickle opcodes in a way picklescan's pattern matching doesn't flag as dangerous. A victim's MLOps pipeline (or an individual data scientist) downloads the model, runs it through picklescan as a standard security gate, and — because the scan reports no issues — proceeds to load it with pickle.load(). At that moment the embedded code executes with the privileges of the loading process, giving the attacker a foothold to exfiltrate credentials, pivot within the ML infrastructure, or tamper with downstream training/inference artifacts.
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