HIGH 8.1

CVE-2025-71372: Picklescan Gadget Chain Bypass Allows Arbitrary Code Execution

Picklescan is a security tool designed to detect malicious code hidden in Python pickle files before they're executed. A vulnerability in versions before 0.0.33 allows attackers to bypass this protection by using a specific Python gadget chain (numpy.f2py.crackfortran.getlincoef) that Picklescan fails to recognize. An attacker can create a malicious pickle file that looks safe to Picklescan but executes arbitrary code when loaded, potentially compromising systems that rely on Picklescan to validate untrusted pickle data—particularly in machine learning supply chains where serialized models are shared.

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.33 fails to detect the numpy.f2py.crackfortran.getlincoef gadget in pickle __reduce__ methods, allowing arbitrary code execution. Attackers can craft malicious pickle files that execute arbitrary Python code when loaded, bypassing Picklescan's safety checks and enabling supply-chain poisoning of shared model files.

3 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

CVE-2025-71372 is a gadget-chain bypass in Picklescan's pickle deserialization inspection logic. The vulnerability exploits the numpy.f2py.crackfortran.getlincoef gadget within __reduce__ methods, a known attack vector in Python's pickle protocol that enables arbitrary code execution. Picklescan's detection engine failed to identify and block this particular gadget chain, leaving a gap in its security model. The issue is classified as Unsafe Deserialization (CWE-502) and affects the integrity of Picklescan's core protective mechanism.

Business impact

Organizations using Picklescan to validate pickle files in machine learning pipelines, data science workflows, or any supply-chain context face a critical trust gap. Attackers can poison shared model repositories, training datasets, or cached pickle objects with code that executes silently during deserialization. This undermines the entire risk mitigation strategy of teams relying on Picklescan, potentially leading to undetected compromise of data science infrastructure, intellectual property theft, lateral movement, or data exfiltration. The impact is amplified in collaborative environments where pickle files are exchanged across teams or organizations.

Affected systems

Picklescan versions prior to 0.0.33 are vulnerable. Any system that depends on Picklescan to validate untrusted pickle input is at risk, particularly data science platforms, machine learning model registries, and data processing pipelines that accept serialized Python objects from external or semi-trusted sources.

Exploitability

Exploitability is moderate to high. The attack requires an attacker to craft a malicious pickle file and convince a user to load it through a system protected by Picklescan, or to inject the file into a supply chain (model repository, dataset distribution, shared storage). The CVSS vector (AV:N/AC:L/PR:N/UI:R/S:U) indicates network accessibility, low attack complexity, and user interaction required—a realistic scenario in collaborative ML environments. No authentication is required to create the malicious payload, though successful exploitation depends on the victim using an affected Picklescan version.

Remediation

Upgrade Picklescan to version 0.0.33 or later, which adds detection for the numpy.f2py.crackfortran.getlincoef gadget chain. Organizations should prioritize this patch if Picklescan is used in production pipelines for model or data validation. As an interim measure, consider additional input validation, sandboxing of pickle deserialization, or avoiding pickle format altogether in favor of safer serialization formats (JSON, Protocol Buffers, etc.) where feasible.

Patch guidance

Update Picklescan from the official Python Package Index (PyPI) to version 0.0.33 or later. Verify the package signature and validate against the vendor's release notes. For organizations with pinned dependencies, update your requirements.txt or constraints file immediately. Test the upgraded Picklescan against your existing pickle validation workflows to ensure no regressions in detection or performance. If you maintain private forks or mirrors of Picklescan, backport the gadget-detection fix before resuming use.

Detection guidance

Monitor Picklescan logs and model-loading events for unusual pickle files or validation errors. Review any pickle files that were processed by Picklescan versions before 0.0.33 and re-scan them with the patched version to identify potential bypass attempts. Check for unexpected code execution, process spawning, or file access during or immediately after pickle deserialization. In data science environments, audit data pipeline logs for indicators of malicious numpy.f2py imports or crackfortran function calls, and inspect model repositories for recently added or modified pickle artifacts. Implement integrity checks (hashing, signing) on critical pickle files to detect tampering.

Why prioritize this

This vulnerability directly undermines a security control that teams explicitly depend on. Picklescan users have made a conscious decision to rely on its gadget detection; this bypass invalidates that decision and creates a false sense of security. The combination of network accessibility, low attack complexity, high confidentiality and integrity impact, and the appeal to attackers of compromising ML supply chains makes this a high-priority patch despite the user-interaction requirement. Organizations should treat this as urgent if Picklescan is in their critical path for model or data validation.

Risk score, explained

The CVSS 3.1 score of 8.1 (HIGH) reflects network-accessible exploitation (AV:N), low attack complexity (AC:L), no privilege requirement (PR:N), and high impact on confidentiality and integrity (C:H/I:H). The user interaction requirement (UI:R) moderates the score somewhat, but in collaborative or open-source contexts where pickle sharing is common, this is a realistic prerequisite rather than a strong mitigant. The bounded scope (S:U) limits availability impact but does not reduce the severity of code execution and data compromise.

Frequently asked questions

Does this affect Picklescan versions after 0.0.33?

No. Version 0.0.33 and later include detection for the numpy.f2py.crackfortran.getlincoef gadget chain. You should verify your version with `pip show picklescan` and upgrade if needed.

Can I detect if a malicious pickle bypassed Picklescan?

Not reliably with Picklescan alone—that's the nature of the vulnerability. Review logs for unexpected process execution, file writes, or network connections around pickle deserialization times. Re-scan historical pickle files with the patched version. Consider runtime sandboxing or code audit of pickle sources as added safeguards.

What if I cannot update Picklescan immediately?

Minimize pickle use, avoid deserializing untrusted files, implement network segmentation around deserialization processes, and consider format migration to JSON or other safer serialization methods. If you must use pickle, isolate deserialization in a sandbox or containerized environment with minimal privileges and network access.

Is Picklescan the only tool affected by pickle gadget chains?

Picklescan is a validation tool, not the only risk. Any Python environment that deserializes untrusted pickle data is inherently vulnerable to gadget-chain attacks. Defense-in-depth strategies (sandboxing, restricted unpickling, input validation) should complement or replace reliance on any single detection tool.

This analysis is provided for informational purposes and represents a reasonable interpretation of publicly disclosed vulnerability data as of the publication date. Specific impact, affected versions, and patch availability should be verified against official vendor advisories and security bulletins. Testing patches in non-production environments is strongly recommended before deployment. SEC.co makes no warranty regarding the completeness, accuracy, or timeliness of this intelligence and assumes no liability for decisions made in reliance on it. Source: NVD (public-domain), retrieved 2026-08-12. Analysis generated by SEC.co (claude-haiku-4-5).