GHSA-9xph-j2h6-g47v: picklescan: scanner bypass enables RCE via model files
GHSA-9xph-j2h6-g47v MEDIUMpicklescan < 0.0.29 fails to detect malicious pickle files that use Python's built-in idlelib.calltip.get_entity as an eval proxy, producing a false-negative scan result. Any pipeline that gates model loading on a picklescan pass is vulnerable to RCE from a file that clears the scan. Upgrade to picklescan 0.0.29 immediately and enforce defense-in-depth—never treat a single scanner pass as sufficient for untrusted model files.
Risk Assessment
High operational risk despite the 'medium' severity label. Exploitability is trivial post-disclosure (5-line PoC), and impact is full RCE on the host that loads the file. The false-negative nature of the vulnerability is especially dangerous: defenders have a false confidence that scanned files are safe. Blast radius covers any MLOps workflow using picklescan as a security gate for pickle-format model files—a pattern widespread across ML engineering teams.
Affected Systems
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| picklescan | pip | < 0.0.29 | 0.0.29 |
Do you use picklescan? You're affected.
Severity & Risk
Recommended Action
4 steps-
Upgrade picklescan to 0.0.29 immediately across all environments.
-
Audit existing model intake workflows: any system that autoloads pickled models after a picklescan pass without additional controls should be treated as potentially compromised if exposed to external model sources.
-
Enforce defense-in-depth: migrate to SafeTensors format for model storage where possible (eliminates pickle deserialization entirely); use torch.load with weights_only=True for PyTorch models; sandbox model loading in isolated containers with no network access.
-
Detection: scan pickle files for references to idlelib.calltip or other non-standard built-in namespaces in __reduce__ methods; alert on unexpected subprocess, os.system, or eval calls originating from ML serving processes at runtime.
Classification
Compliance Impact
This CVE is relevant to:
Frequently Asked Questions
What is GHSA-9xph-j2h6-g47v?
picklescan < 0.0.29 fails to detect malicious pickle files that use Python's built-in idlelib.calltip.get_entity as an eval proxy, producing a false-negative scan result. Any pipeline that gates model loading on a picklescan pass is vulnerable to RCE from a file that clears the scan. Upgrade to picklescan 0.0.29 immediately and enforce defense-in-depth—never treat a single scanner pass as sufficient for untrusted model files.
Is GHSA-9xph-j2h6-g47v actively exploited?
No confirmed active exploitation of GHSA-9xph-j2h6-g47v has been reported, but organizations should still patch proactively.
How to fix GHSA-9xph-j2h6-g47v?
1. Upgrade picklescan to 0.0.29 immediately across all environments. 2. Audit existing model intake workflows: any system that autoloads pickled models after a picklescan pass without additional controls should be treated as potentially compromised if exposed to external model sources. 3. Enforce defense-in-depth: migrate to SafeTensors format for model storage where possible (eliminates pickle deserialization entirely); use torch.load with weights_only=True for PyTorch models; sandbox model loading in isolated containers with no network access. 4. Detection: scan pickle files for references to idlelib.calltip or other non-standard built-in namespaces in __reduce__ methods; alert on unexpected subprocess, os.system, or eval calls originating from ML serving processes at runtime.
What systems are affected by GHSA-9xph-j2h6-g47v?
This vulnerability affects the following AI/ML architecture patterns: model serving, training pipelines, MLOps pipelines, model registries.
What is the CVSS score for GHSA-9xph-j2h6-g47v?
No CVSS score has been assigned yet.
Technical Details
NVD Description
### Summary Using idlelib.calltip.get_entity function, which is a built-in python library function to execute remote pickle file. ### Details The attack payload executes in the following steps: First, the attacker craft the payload by calling to idlelib.calltip.get_entity function in reduce method Then when the victim after checking whether the pickle file is safe by using Picklescan library and this library doesn't dectect any dangerous functions, decide to pickle.load() this malicious pickle file, thus lead to remote code execution. ### PoC ``` from idlelib.calltip import get_entity class EvilCalltipGetEntity: def __reduce__(self): # get_entity(expression) -> eval(expression) return get_entity, ("__import__('os').system('whoami')",) ``` ### Impact Who is impacted? Any organization or individual relying on picklescan to detect malicious pickle files inside PyTorch models. What is the impact? Attackers can embed malicious code in pickle file that remains undetected but executes when the pickle file is loaded. Supply Chain Attack: Attackers can distribute infected pickle files across ML models, APIs, or saved Python objects. ### Corresponding https://github.com/FredericDT https://github.com/Qhaoduoyu
Exploitation Scenario
An attacker publishes a fine-tuned language or vision model to Hugging Face or a corporate model registry. The model file contains a __reduce__ method that calls idlelib.calltip.get_entity with an embedded reverse shell command—idlelib.calltip internally calls eval(), executing the payload. The victim organization's automated MLOps pipeline downloads the model, runs picklescan (file passes with no warnings), and loads it into the inference environment. The shell executes with the privileges of the ML serving process, yielding access to GPU nodes, production model weights, and internal network segments. The entire compromise chain is invisible to teams relying solely on picklescan.
References
Timeline
Related Vulnerabilities
GHSA-vvpj-8cmc-gx39 10.0 picklescan: security flaw enables exploitation
Same package: picklescan GHSA-g38g-8gr9-h9xp 9.8 picklescan: Allowlist Bypass evades input filtering
Same package: picklescan GHSA-7wx9-6375-f5wh 9.8 picklescan: Allowlist Bypass evades input filtering
Same package: picklescan CVE-2025-1945 9.8 picklescan: ZIP flag bypass enables RCE in PyTorch models
Same package: picklescan GHSA-hgrh-qx5j-jfwx 8.8 picklescan: Protection Bypass circumvents security controls
Same package: picklescan
AI Threat Alert