CVE-2025-71343: picklescan Detection Bypass Allows Remote Code Execution
picklescan, a security tool designed to detect malicious pickle files before they're loaded, contains a detection bypass in versions before 0.0.30. Attackers can craft specially constructed pickle files that exploit a function in Python's lib2to3 library to execute arbitrary code while evading picklescan's safety checks. The vulnerability is triggered when a user or application calls pickle.load() on a crafted malicious file, making it a supply-chain and deserialization risk for organizations relying on picklescan for protection.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 8.1 HIGH · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
- Weaknesses (CWE)
- CWE-502
- Affected products
- 0 configuration(s)
- Published / Modified
- 2026-07-04 / 2026-07-07
NVD description (verbatim)
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.
3 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2025-71343 exploits a gap in picklescan's detection logic by leveraging the lib2to3.pgen2.pgen.ParserGenerator.make_label function within the pickle reduce method. Pickle's reduce protocol allows objects to specify custom deserialization behavior. By embedding malicious code in a way that invokes make_label during unpickling, an attacker can bypass picklescan's static analysis and execute arbitrary Python code. The vulnerability affects all picklescan versions prior to 0.0.30. The root cause is insufficient coverage of code paths that can be weaponized during object reconstruction, allowing gadget chains to go undetected.
Business impact
Organizations using picklescan to validate untrusted pickle data—such as those processing serialized data from external sources, ML model artifacts, or cache files—face a critical trust boundary breach. A successful attack allows remote code execution with the privileges of the process running pickle.load(). This can compromise sensitive data, inject malicious model weights, poison ML pipelines, or establish persistence. The impact is compounded by picklescan's role as a security control; organizations may have reduced their defensive posture, assuming picklescan provides reliable protection.
Affected systems
picklescan versions before 0.0.30 are affected. Any application or workflow that uses picklescan to validate pickle files before deserialization is at risk. This includes Python applications processing untrusted serialized objects, data science platforms, machine learning model repositories, and microservices that accept pickle-based inter-process communication. Organizations using picklescan as part of a security scanning pipeline are particularly exposed.
Exploitability
Exploitability is high. The attack requires user interaction (a user or process must call pickle.load() on the malicious file) but no authentication or special privileges. Crafting the malicious pickle file is feasible for a competent attacker with knowledge of Python's pickle protocol and the lib2to3 library internals. No special system configuration is required. The bypass is reliable and repeatable, making this suitable for targeted attacks on data pipelines or supply-chain scenarios where pickle files are exchanged.
Remediation
Upgrade picklescan to version 0.0.30 or later immediately. Organizations should prioritize this patch given picklescan's role as a security control. Beyond patching, implement defense-in-depth: restrict pickle deserialization from untrusted sources, enforce code signing and integrity checks on pickle files, isolate deserialization processes with sandboxing, and consider alternative serialization formats (JSON, Protocol Buffers, MessagePack) where feasible. Review logs for unexpected pickle.load() calls or picklescan version history to identify whether malicious files may have been processed pre-patch.
Patch guidance
Update picklescan from the official repository or package manager (e.g., PyPI) to version 0.0.30 or any later stable release. This patch specifically addresses the detection gap in the lib2to3.pgen2.pgen.ParserGenerator.make_label gadget chain. After patching, re-scan any pickle files that were processed before the upgrade using the patched version to confirm they are safe. Automated dependency management tools can help identify picklescan installations across your environment.
Detection guidance
Monitor for pickle.load() or pickle.loads() calls in your codebase, particularly those handling external or untrusted data. Review picklescan version numbers in requirements files and installed packages to ensure all instances are 0.0.30 or later. If you have packet capture or process monitoring, look for anomalous behavior (unexpected code execution, data exfiltration) immediately following deserialization of pickle files from external sources. Check for pickle files in your supply chain—caches, artifact repositories, model stores—and re-validate them with patched picklescan if they originated from untrusted sources during the vulnerable window.
Why prioritize this
This is a HIGH-severity vulnerability affecting a critical security tool. The impact is remote code execution with no authentication required, and the attack surface includes any use of picklescan in a validation pipeline. Although user interaction is required to trigger the payload, the nature of picklescan's deployment (as an automated security control) means pickle files may be deserialized in batch processes or automated workflows, reducing the practical friction for an attacker. Immediate patching is strongly recommended.
Risk score, explained
The CVSS 3.1 score of 8.1 reflects a high-severity remote code execution vulnerability with a low attack complexity. The attack vector is network-based (an attacker sends a malicious pickle file), no privileges are required, and the confidentiality and integrity impacts are high (arbitrary code execution). The absence of availability impact (no denial of service) prevents a critical score. The score appropriately captures the severity of a detection bypass in a security-critical tool.
Frequently asked questions
If we're not using picklescan, are we affected?
No, this vulnerability is specific to picklescan. However, if your organization deserializes pickle files from untrusted sources without any protection, you face a general deserialization risk independent of this CVE. Consider whether you use pickle in sensitive workflows and implement appropriate mitigations such as serialization format alternatives or sandboxing.
Does this vulnerability affect pickle itself or just picklescan?
This vulnerability is in picklescan's detection logic, not in Python's pickle module. The underlying pickle protocol allows the lib2to3.pgen2.pgen.ParserGenerator.make_label gadget chain to execute code, but picklescan should detect it. The bypass means picklescan fails in its detection job, allowing a normally detectable attack to slip through.
Can we detect if malicious pickles were processed before patching?
Not easily through automated means. If you have detailed logs of all pickle.load() operations (including file hashes or content), you could re-scan those files with patched picklescan. However, if code already executed, forensic analysis and endpoint detection/response (EDR) tools may reveal suspicious behavior. Review application logs and system logs from the vulnerable period.
What should we do if we discover picklescan in our supply chain or artifact repositories?
Upgrade to version 0.0.30 immediately, then re-scan any pickle artifacts that may have been stored or distributed during the vulnerable period. Review access logs to determine if any malicious pickle files could have been introduced. Consider implementing signed pickle artifacts and digital signatures to authenticate their origin and integrity going forward.
This analysis is based on the CVE record as of the publication date. Verify all patch versions, vendor advisories, and affected product lists directly with the picklescan project and your organization's vulnerability management system. This assessment assumes standard Python deserialization workflows; your specific environment and threat model may differ. Always test patches in a staging environment before production deployment. No exploit code or detailed weaponization steps are provided; refer to your incident response and security operations procedures for breach investigation. Source: NVD (public-domain), retrieved 2026-08-12. Analysis generated by SEC.co (claude-haiku-4-5).
Weaknesses (CWE)
Related vulnerabilities
- CVE-2025-11993HIGHWooCommerce Infinite Scroll Plugin PHP Object Injection – HIGH Severity
- CVE-2025-27511HIGHGeoServer DB2 JNDI Injection Remote Code Execution
- CVE-2025-69130HIGHPHP Object Injection in Entrepreneur WordPress Booking Theme ≤3.1.3
- CVE-2025-71339HIGHPicklescan Gadget Bypass Allows Arbitrary Code Execution
- CVE-2025-71340HIGHPicklescan Evasion via idlelib.pyshell.ModifiedInterpreter
- CVE-2025-71341HIGHPicklescan Bypass Enables Remote Code Execution via profile.Profile.runctx
- CVE-2025-71342HIGHPicklescan Evasion Enables Remote Code Execution in PyTorch Models
- CVE-2025-71344HIGHpicklescan RCE via Undetected ensurepip._run_pip