VYPR
Unrated severityNVD Advisory· Published Jun 21, 2026

picklescan - Arbitrary Code Execution via Undetected idlelib.pyshell.ModifiedInterpreter.runcommand

CVE-2025-71357

Description

picklescan before 0.0.30 fails to detect malicious pickle files using idlelib.pyshell.ModifiedInterpreter.runcommand in reduce methods. Attackers can embed undetected code in pickle files that executes remote commands when loaded by victims.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Affected products

2

Patches

Vulnerability mechanics

Root cause

"Missing detection of idlelib.pyshell.ModifiedInterpreter.runcommand in picklescan's list of dangerous reduce functions allows malicious pickle files to bypass scanning."

Attack vector

An attacker crafts a pickle file whose `__reduce__` method calls `idlelib.pyshell.ModifiedInterpreter.runcommand` with a payload such as `__import__('os').system('whoami')`. The victim uses picklescan to verify the file, but picklescan does not flag this function as dangerous. When the victim subsequently calls `pickle.load()`, the payload executes, achieving remote code execution [ref_id=1].

Affected code

The vulnerability resides in picklescan's failure to detect `idlelib.pyshell.ModifiedInterpreter.runcommand` as a dangerous reduce method. The advisory states that picklescan before 0.0.30 does not flag this built-in Python library function, allowing malicious pickle files to bypass scanning [ref_id=1].

What the fix does

The patch adds `idlelib.pyshell.ModifiedInterpreter.runcommand` to picklescan's list of dangerous reduce functions. By including this built-in Python function in the detection set, picklescan now flags pickle files that attempt to use it, preventing the undetected execution of arbitrary commands when the pickle is loaded [ref_id=1].

Preconditions

  • configVictim uses picklescan version prior to 0.0.30 to scan a pickle file
  • inputVictim loads the pickle file with pickle.load() after the scan passes

Generated on Jun 22, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

2

News mentions

0

No linked articles in our index yet.