picklescan - Arbitrary Code Execution via Undetected idlelib.autocomplete.AutoComplete.fetch_completions
Description
picklescan before 0.0.29 fails to detect malicious pickle files using idlelib.autocomplete.AutoComplete.fetch_completions in reduce methods. Attackers can embed undetected code in pickle files that executes arbitrary commands when loaded by victims.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected products
1- Range: <0.0.29
Patches
Vulnerability mechanics
Root cause
"Missing detection of idlelib.autocomplete.AutoComplete.fetch_completions in picklescan's allowlist/blocklist allows malicious pickle files to bypass security checks."
Attack vector
An attacker crafts a pickle payload that calls `idlelib.autocomplete.AutoComplete.fetch_completions` inside the `__reduce__` method [ref_id=1]. The attacker distributes the malicious pickle file (e.g., embedded in a PyTorch model or saved Python object). When a victim runs picklescan on the file, the library does not flag the payload as dangerous. The victim then calls `pickle.load()` on the file, which triggers the `fetch_completions` function and executes arbitrary commands supplied by the attacker [ref_id=1].
Affected code
The vulnerability lies in picklescan before version 0.0.29, which fails to detect malicious pickle files that use `idlelib.autocomplete.AutoComplete.fetch_completions` in the `__reduce__` method. The missing detection occurs because picklescan's allowlist or blocklist does not cover this built-in Python library function, allowing it to bypass security checks.
What the fix does
The advisory does not include a patch diff, but the fix is to update picklescan to version 0.0.29 or later, which adds detection for `idlelib.autocomplete.AutoComplete.fetch_completions` in the reduce method [ref_id=1]. The remediation closes the gap by expanding the library's blocklist to cover this built-in Python function, so that any pickle file attempting to use it is flagged as malicious before `pickle.load()` is called.
Preconditions
- configThe victim must use picklescan before version 0.0.29 to scan the pickle file.
- inputThe victim must call pickle.load() on the attacker-controlled pickle file after scanning.
- inputThe attacker must craft a pickle file whose __reduce__ method returns AutoComplete().fetch_completions as the callable.
Generated on Jun 24, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
2News mentions
0No linked articles in our index yet.