CVE-2025-71341: Picklescan Bypass Enables Remote Code Execution via profile.Profile.runctx
Picklescan, a tool designed to scan Python pickle files for malicious code, has a detection bypass vulnerability in versions before 0.0.29. An attacker can craft a malicious pickle file that uses the profile.Profile.runctx function in a way that picklescan fails to detect, allowing arbitrary code execution when the file is unpickled. This is particularly dangerous because picklescan is often relied upon as a security control to prevent exactly this kind of attack.
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-06-23 / 2026-06-23
NVD description (verbatim)
picklescan before 0.0.29 fails to detect the profile.Profile.runctx function when analyzing pickle files, allowing attackers to embed undetected malicious code. Remote attackers can craft malicious pickle files using profile.Profile.runctx in the reduce method to achieve remote code execution when the pickle file is loaded.
3 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2025-71341 exploits an incomplete detection mechanism in picklescan's analysis engine. The vulnerability stems from the tool's failure to recognize profile.Profile.runctx as a dangerous function when used within the reduce method of pickle serialization. By leveraging this blind spot, attackers can embed code execution primitives that bypass picklescan's inspection, resulting in remote code execution upon deserialization. The root cause is a gap in the function signature detection logic, allowing this specific gadget chain to slip through undetected.
Business impact
Organizations using picklescan as part of their input validation or threat detection pipeline for untrusted pickle data face a critical security regression. If picklescan is integrated into workflow automation, data pipeline security gates, or external data ingestion processes, attackers can bypass these controls entirely. The reputational and operational impact depends on whether the organization relies on picklescan as a primary defense; if it does, this vulnerability represents a complete failure of that control until patching occurs.
Affected systems
Any deployment running picklescan versions prior to 0.0.29 is vulnerable. This includes development environments, CI/CD pipelines, data analysis platforms, and any production systems that use picklescan to validate or scan pickle files before processing. The impact is particularly acute in data science and machine learning workflows where pickle deserialization is common but security controls may be limited.
Exploitability
Exploitation requires network delivery of a crafted pickle file and user interaction (opening or processing the file), making this a practical attack vector in scenarios involving email attachments, shared repositories, or web-based file uploads. The attack requires no authentication or special privileges on the target system. Proof-of-concept generation is straightforward for anyone familiar with Python pickle gadget chains, as the evasion technique is deterministic once the picklescan detection gap is understood.
Remediation
Upgrade picklescan to version 0.0.29 or later immediately. Verify the upgraded version is deployed across all systems, including development machines, CI/CD agents, and any containerized environments. Organizations should also conduct a brief inventory of where picklescan is relied upon as a security control and consider supplementary validation measures (e.g., sandboxed deserialization, deny-listing known gadget chains) during the transition period.
Patch guidance
Update picklescan via your package manager (pip install --upgrade picklescan) and verify the installed version is 0.0.29 or later using pip show picklescan. For containerized deployments, rebuild container images with the patched version and redeploy. For dependency-managed projects, update your lock file and rebuild. Test the upgrade in a non-production environment first to ensure compatibility with your specific pickle scanning workflows. No configuration changes are required post-patch.
Detection guidance
In the interim before patching, monitor for suspicious pickle file ingestion, particularly from external sources. Implement network-level controls to restrict pickle file transfers if possible. Enable logging on any systems where picklescan is invoked and look for processing of pickle files containing profile.Profile references or runctx method calls—though note that such logging may not be standard. Consider running pickle files in a sandboxed environment as an additional defensive layer while relying on picklescan for this version window.
Why prioritize this
This vulnerability merits immediate attention because it directly undermines a security tool's core function. If picklescan is deployed as a detection/prevention mechanism, this becomes a critical control failure. The high CVSS score (8.1) reflects the combination of network-accessible attack surface, no authentication requirement, and high-impact code execution, tempered only by the user interaction requirement. Organizations should treat this as a security control regression rather than a typical vulnerability patch.
Risk score, explained
The CVSS 3.1 score of 8.1 (HIGH) is driven by network-accessible attack vector (AV:N), low attack complexity (AC:L), no privilege requirement (PR:N), and high confidentiality and integrity impact (C:H, I:H). The requirement for user interaction (UI:R) prevents a perfect 9.0+ score. Organizations with high reliance on picklescan for untrusted input handling should treat this as functionally equivalent to a critical issue despite the CVSS rating.
Frequently asked questions
Does this vulnerability affect my organization if we don't use picklescan?
No. This vulnerability is specific to picklescan and only impacts organizations actively using it for pickle file validation or scanning. If your systems do not invoke picklescan, you are not affected by this CVE.
Can picklescan prevent exploitation of pickle deserialization vulnerabilities in my application code?
Picklescan is a detection and inspection tool, not a runtime protection mechanism. It can identify suspicious pickle files before processing, but it does not prevent exploitation in vulnerable application code. Always use picklescan as one layer of defense alongside secure coding practices and, when possible, avoiding pickle deserialization of untrusted data altogether.
What should we do if we discover we've processed untrusted pickle files with vulnerable picklescan versions?
Immediately audit logs to identify which files were processed and whether any triggered alerts or anomalies. Assume that any pickle files from untrusted sources processed during the vulnerable period may have contained undetected malicious code. Conduct endpoint forensics on systems that processed such files and consider them potentially compromised until investigation concludes. Then upgrade picklescan and re-scan the historical file set with the patched version.
Is there a workaround if we cannot patch immediately?
The most effective interim mitigation is to avoid processing untrusted pickle files entirely until patching is complete. If that is not feasible, implement strict network isolation around systems that handle pickle deserialization, use additional validation mechanisms (such as cryptographic signatures on pickle files), and consider deserializing in a sandboxed environment. However, these are not substitutes for patching—prioritize the upgrade.
This analysis is based on the CVE description and CVSS vector provided. No exploit code or weaponized proof-of-concept is included. Organizations should verify patch availability and version numbers against official picklescan release notes and GitHub repository before deploying updates. This vulnerability has not been designated as part of CISA's Known Exploited Vulnerabilities catalog as of the publication date. Security teams should supplement this analysis with threat intelligence from their security vendors and internal threat modeling relevant to their specific use of picklescan. Source: NVD (public-domain), retrieved 2026-07-28. 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-71344HIGHpicklescan RCE via Undetected ensurepip._run_pip
- CVE-2025-71348HIGHpicklescan Detection Evasion in Torch Config Loading
- CVE-2025-71357HIGHPicklescan Evasion via idlelib.pyshell.ModifiedInterpreter
- CVE-2025-71358HIGHpicklescan Detection Bypass via Malicious Pickle Files (CVSS 8.1)