CVE-2025-71322: PickleScan Unsafe Globals Bypass – pty.spawn RCE Vulnerability
PickleScan is a security tool designed to inspect Python pickle files and block dangerous code execution. Before version 0.0.33, it had a critical oversight: it failed to block the pty.spawn function, which allows spawning new processes. An attacker can exploit this gap by crafting a malicious pickle file that uses pty.spawn to run arbitrary commands when PickleScan processes it. The vulnerability is particularly dangerous because it requires minimal interaction—just opening a file—and can be delivered remotely.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 8.8 HIGH · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- Weaknesses (CWE)
- CWE-693
- Affected products
- 0 configuration(s)
- Published / Modified
- 2026-06-17 / 2026-06-18
NVD description (verbatim)
PickleScan before 0.0.33 fails to include the pty.spawn function in its unsafe globals list, allowing attackers to bypass security checks. Malicious actors can craft pickle payloads using pty.spawn to achieve arbitrary code execution when files are processed by PickleScan.
3 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2025-71322 exploits an incomplete unsafe globals configuration in PickleScan's sandboxing mechanism. PickleScan uses a whitelist approach to define which functions and modules are permitted when unpickling data. The pty.spawn function, which provides low-level process spawning capabilities, was omitted from the unsafe globals list prior to version 0.0.33. Attackers craft pickle objects that reconstruct and invoke pty.spawn directly, bypassing the intended security controls. This falls under CWE-693 (Protection Mechanism Failure), indicating a flaw in the tool's core defense architecture. The CVSS 3.1 score of 8.8 (HIGH) reflects the complete compromise potential: network-exploitable with low complexity, no authentication required, and direct impact to confidentiality, integrity, and availability.
Business impact
Organizations using PickleScan to validate untrusted pickle data face immediate risk of complete system compromise. If PickleScan is integrated into data pipelines, threat detection systems, or automated file processing workflows, a single malicious pickle file can lead to unauthorized code execution with the privileges of the process running PickleScan. This may result in data exfiltration, lateral movement, ransomware deployment, or supply chain contamination if the affected system handles third-party data. The vulnerability undermines the trust placed in PickleScan as a security boundary.
Affected systems
PickleScan versions prior to 0.0.33 are vulnerable. The vendor products list in the source data is empty, suggesting PickleScan may be a standalone utility rather than a bundled component. Organizations should audit their environment for PickleScan installations and verify version numbers. Any automated process that uses PickleScan to scan or validate pickle files from untrusted sources is at risk.
Exploitability
Exploitability is high. The attack vector is network-based (CVSS AV:N), requires no special privileges (PR:N), and has low complexity (AC:L). However, user interaction (UI:R) is required—an attacker must convince someone to process a malicious pickle file through PickleScan. Proof-of-concept development would be straightforward for a skilled attacker familiar with Python pickle internals and pty.spawn semantics. No known public exploits are listed in the KEV catalog, but the simplicity of the vulnerability makes weaponization likely once widely disclosed.
Remediation
Upgrade PickleScan to version 0.0.33 or later immediately. The patch adds pty.spawn to the unsafe globals list, restoring the intended security boundary. There are no known workarounds for earlier versions; patching is the only reliable mitigation. Organizations should also review where PickleScan fits into their data validation architecture and consider defense-in-depth measures such as sandboxing the PickleScan process itself or applying additional validation layers.
Patch guidance
Apply PickleScan version 0.0.33 or later. Consult the official PickleScan repository or release notes to confirm the patch is available in your distribution channel. Test the upgrade in a non-production environment first to ensure compatibility with existing workflows. After deployment, verify that PickleScan correctly rejects pickle files that attempt to use pty.spawn or related process-spawning functions. Monitor for any error logs indicating blocked execution attempts.
Detection guidance
In PickleScan logs, look for error messages indicating blocked or rejected pty.spawn calls after upgrading. If you are still running a vulnerable version, detection is difficult because the bypass succeeds silently. To identify exposure, check for unexpected process spawning or outbound connections from processes running PickleScan. Audit pickle files in your data pipelines for suspicious opcode sequences (GLOBAL instructions referencing pty.spawn). Consider deploying file integrity monitoring and process execution monitoring around PickleScan deployments to catch exploitation attempts.
Why prioritize this
This is a high-priority patch due to the complete bypass of a security-critical function, the low complexity of exploitation, and the absence of authentication or special privileges required. Any organization relying on PickleScan as a trust boundary for untrusted pickle data should treat this as urgent. However, the requirement for user interaction (delivering a malicious file) slightly reduces priority compared to fully remote, unauthenticated worm-capable flaws.
Risk score, explained
The CVSS 3.1 score of 8.8 reflects a high-severity vulnerability with direct impact to all three security properties (confidentiality, integrity, availability). The low attack complexity and lack of authentication requirements drive the high score. The network attack vector acknowledges that pickle files can be delivered remotely. The user interaction requirement (UI:R) prevents a perfect 9.8 score but does not materially lower the risk given the ease of social engineering or inadvertent processing of untrusted data.
Frequently asked questions
Do we need PickleScan if we already use other security controls?
PickleScan is a specialized tool for validating Python pickle files specifically. If your organization processes pickle data from untrusted sources, PickleScan adds valuable defense-in-depth. However, it should not be your sole security boundary. Pair it with network controls, sandboxing, least-privilege execution, and input validation. Even after patching, treat PickleScan as one layer among many.
How do we know if we're using PickleScan?
Check your dependencies and requirements files (e.g., requirements.txt, poetry.lock, pip freeze output) for 'picklescan' or 'pickle-scan'. Search your codebase for imports such as 'from picklescan' or 'import picklescan'. If you're using automated data validation or malware detection tools, verify whether PickleScan is an optional or bundled component.
Can we safely downgrade to an older version after patching?
No. Downgrading reintroduces the vulnerability. Once patched, maintain version 0.0.33 or later. If a regression occurs in 0.0.33 or a later patch release, report it to the PickleScan maintainers rather than downgrading. Check the project's issue tracker for known problems before updating.
What happens if our process runs PickleScan under a restricted user account?
Running under a restricted account limits the blast radius—an attacker gains only the privileges of that user. However, if PickleScan runs as root, a service account with broad permissions, or on a sensitive system, the impact remains severe. Principle of least privilege is good practice regardless, but it is not a substitute for patching.
This analysis is based on publicly disclosed information and the provided CVE record as of the publication date. Patch version numbers, affected product details, and KEV status are sourced directly from the CVE record. Organizations should verify compatibility and test patches in non-production environments before deployment. This advisory does not constitute legal or compliance advice. Consult your organization's security team and the official PickleScan maintainers for definitive guidance on remediation timelines and specific configurations. Source: NVD (public-domain), retrieved 2026-07-27. Analysis generated by SEC.co (claude-haiku-4-5).
Weaknesses (CWE)
Related vulnerabilities
- CVE-2025-24284HIGHmacOS Sandbox Escape Vulnerability – Sequoia 15.4 Patch Required
- CVE-2025-48649HIGHAndroid Local Privilege Escalation via Permission Bypass
- CVE-2025-48652HIGHAndroid MDM Bypass Logic Flaw – HIGH Severity Privilege Escalation
- CVE-2026-0045HIGHAndroid Bluetooth Bonding Bypass Privilege Escalation
- CVE-2026-0077HIGHAndroid ActivityRecord Privilege Escalation Vulnerability
- CVE-2026-0087HIGHAndroid App Link Hijacking via Domain Verification Logic Error
- CVE-2026-0097HIGHAndroid Bluetooth Pairing Logic Error Allows Silent Privilege Escalation
- CVE-2026-11170HIGHChrome Chromoting Linux Privilege Escalation (CVSS 8.1)