CVE-2025-71362: picklescan Detection Bypass via numpy.f2py.crackfortran eval Injection
picklescan is a security tool designed to scan Python pickle files for potentially dangerous code before they are deserialized. A flaw in versions prior to 0.0.33 allows attackers to bypass this protection by embedding malicious code that exploits a specific numpy function call pattern. When a pickle file containing this exploit is opened, the embedded code executes with the privileges of the user running the application. This affects anyone relying on picklescan to safely handle pickle files from untrusted sources.
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-06
NVD description (verbatim)
picklescan before 0.0.33 fails to detect unsafe deserialization when numpy.f2py.crackfortran functions call eval on arbitrary strings. Attackers can embed malicious code in pickle files that executes when loaded from untrusted sources.
3 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2025-71362 is a detection bypass vulnerability in picklescan's static analysis of pickle bytecode. The vulnerability stems from picklescan's failure to detect unsafe deserialization patterns when numpy.f2py.crackfortran functions invoke eval() on attacker-controlled string arguments. An adversary can craft a malicious pickle file that reconstructs these function calls with arbitrary string payloads. During unpickling, the eval() call executes the attacker's code in the context of the Python interpreter. The root cause is insufficient coverage of numpy's f2py module in picklescan's safety rules, allowing a known unsafe pattern to remain undetected.
Business impact
Organizations using picklescan to validate pickle files before processing untrusted data face a critical gap in their defense. Machine learning pipelines, data science workflows, and inter-process communication systems that rely on pickled Python objects are vulnerable if picklescan is their primary security control. A compromised pickle file could lead to arbitrary code execution on production systems, data exfiltration, lateral movement, or supply-chain attacks if pickle files are exchanged between trusted parties. The impact is elevated for teams that have reduced their security scrutiny based on a false sense of protection from picklescan validation.
Affected systems
The vulnerability affects picklescan versions before 0.0.33. Any Python environment importing and using an affected version of picklescan to deserialize pickle files is at risk. This includes data science platforms (Jupyter, JupyterHub), machine learning frameworks that serialize models as pickles, and custom applications that parse untrusted pickle data. The vulnerability does not affect pickle security in general—only picklescan's ability to detect and warn about these specific attacks.
Exploitability
Exploitation requires an attacker to craft a malicious pickle file and convince or trick a user into deserializing it. The attack vector is network-based (email attachment, malicious download, compromised repository), though local file access is also possible. No special privileges are required on the attacker side, and the attack succeeds automatically once the pickle is unpickled—no additional interaction is needed beyond the user opening the file. The use of a legitimate numpy function as the attack vector makes detection and forensic analysis more difficult. CVSS 8.1 (HIGH) reflects the combination of network exploitability, ease of attack, and high impact on confidentiality and integrity.
Remediation
Upgrade picklescan to version 0.0.33 or later. This patched version includes detection rules for the numpy.f2py.crackfortran eval pattern. After upgrading, re-scan any pickle files that were previously validated with older versions if they came from untrusted sources. Organizations should also consider defense-in-depth measures: run pickle deserialization in isolated sandboxed environments, restrict network access to systems that parse pickles, and implement code review for any custom pickle handling logic.
Patch guidance
Apply the fix by updating picklescan via your Python package manager (pip install --upgrade picklescan). Verify that the installed version is 0.0.33 or later by running pip show picklescan or checking the version in your lockfile. No configuration changes are required after upgrade. Test the patched version against any pickle files you maintain to ensure compatibility and that detection now flags previously undetectable payloads in test cases.
Detection guidance
Monitor logs for unpickling operations that involve numpy or f2py modules, particularly any eval() calls with string reconstruction. Use static analysis on pickle files in your repositories: tools like pickletools.dis() can help identify suspicious bytecode patterns. Network detection should focus on identifying pickle files (.pkl, .pickle, .joblib files containing pickle data) being transferred over unencrypted channels or from unexpected sources. Endpoint detection should alert on Python processes spawned by deserialization operations, especially those with high privilege levels or network outbound connections.
Why prioritize this
HIGH priority due to the combination of a network-exploitable attack vector, ease of weaponization (pickle files are common in data science), and the fact that picklescan is explicitly designed to prevent this class of attack. The bypass undermines trust in a widely-used security tool. Organizations cannot simply apply picklescan and forget about pickle security—they must ensure they are running a patched version. The 8.1 CVSS score and lack of KEV status should not be misinterpreted as low urgency; this is a direct attack on a security control.
Risk score, explained
CVSS 3.1 score of 8.1 (HIGH) is justified by: Attack Vector: Network (AV:N) – malicious pickles can be distributed remotely; Attack Complexity: Low (AC:L) – no special conditions required; Privileges Required: None (PR:N) – unauthenticated attacker; User Interaction: Required (UI:R) – user must deserialize the pickle; Scope: Unchanged (S:U); Confidentiality Impact: High (C:H) – arbitrary code execution can steal data; Integrity Impact: High (I:H) – code execution allows modification of system state; Availability Impact: None (A:N) – resource exhaustion is possible but not the primary threat. The score appropriately reflects a serious but not critical vulnerability, as it requires user action to trigger and does not enable privilege escalation by default.
Frequently asked questions
Does this vulnerability affect my pickle files if I don't use picklescan?
No. This vulnerability is specific to picklescan's failure to detect the attack. Pickle files remain inherently unsafe to deserialize from untrusted sources regardless of picklescan's presence. picklescan was designed to provide an additional layer of validation—this CVE shows that layer had a gap. Standard pickle security best practices (only deserializing trusted data, using alternative formats like JSON, or sandboxing deserialization) remain necessary.
If I'm not using numpy or f2py, am I safe?
Not necessarily. This CVE demonstrates a detection bypass for one specific unsafe pattern. Other attack vectors against picklescan may exist. Additionally, if you generate or share pickle files with users who have numpy installed, those users are vulnerable if they use picklescan to validate your pickles. The safest approach is to assume picklescan is a detective control, not a preventive one, and apply additional safeguards.
What should I do if I find a malicious pickle file after scanning it with picklescan?
First, isolate the system and assume it may be compromised. Check process and network logs for suspicious activity since the time of deserialization. Determine whether the pickle was actually deserialized (loaded) or merely scanned—picklescan by itself does not execute code, only the unpickling operation does. Rotate credentials, patch systems, and conduct incident response. Upgrade picklescan and re-test it against a sanitized version of the malicious pickle to confirm the new version would have detected it.
Can I mitigate this without upgrading immediately?
Temporarily, yes. Stop deserializing pickle files from any untrusted source and suspend reliance on picklescan as your primary validation control. Use alternative serialization formats (JSON, Protocol Buffers, MessagePack) where possible. If you must use pickles, deserialize them only in isolated environments (containers, VMs) with minimal network access. However, upgrading to 0.0.33 is the proper fix and should be prioritized within your change management window.
This analysis is based on the CVE record as of the publication date. SEC.co does not provide warranty that all affected systems or attack variants have been identified. Organizations should verify patch availability and compatibility with their specific versions of picklescan and dependent libraries before deploying updates. Indicators of compromise, detection rules, and remediation steps should be validated in a test environment before production deployment. For official guidance, consult the picklescan project repository and security advisories from your Python package management tools. 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-71343HIGHpicklescan Detection Bypass Allows Remote Code Execution