Skip to main content

Picklescan is missing detection when calling built-in python idlelib.pyshell.ModifiedInterpreter.runcommand (CVE-2025-71357)

0
High
Published: 08/26/2025 (08/26/2025, 21:36:47 UTC)
Source: GCVE Database
Product: picklescan

Description

### Summary Using idlelib.pyshell.ModifiedInterpreter.runcommand 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.pyshell.ModifiedInterpreter.runcommand 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.pyshell import ModifiedInterpreter from types import SimpleNamespace class EvilIdlelibPyshellModifiedInterpreterRuncommand: def __reduce__(self): payload = "__import__('os').system('whoami')" fake_self = SimpleNamespace( locals={}, tkconsole=SimpleNamespace(executing=False), rpcclt=None, debugger=None ) return ModifiedInterpreter.runcommand, (fake_self, payload) ``` ### 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

CVSS v4.0

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
Passive
Vuln. Confidentiality
High
Vuln. Integrity
High
Vuln. Availability
None
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N

Affected software

PyPIghsa
picklescan
Affected versions
<0.0.30

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 09/11/2026, 22:47:10 UTC

Technical Analysis

The vulnerability in Picklescan arises because it does not detect malicious payloads that exploit the idlelib.pyshell.ModifiedInterpreter.runcommand function during pickle deserialization. An attacker can craft a pickle file whose reduce method calls this function with a payload that executes arbitrary system commands. When Picklescan scans such a file, it fails to flag it as dangerous, leading to execution of the embedded code when the pickle file is loaded. This can be used to perform remote code execution, posing a supply chain risk especially in ML models or APIs that use pickle serialization.

Potential Impact

Any user or organization relying on Picklescan to detect malicious pickle files is at risk. Attackers can embed undetected malicious code in pickle files that execute upon loading, potentially leading to remote code execution. This vulnerability can be exploited to distribute infected pickle files across machine learning models, APIs, or saved Python objects, facilitating supply chain attacks.

Mitigation Recommendations

A patch is available for this vulnerability. Users should upgrade Picklescan to version 0.0.30 or later to ensure detection of malicious payloads involving idlelib.pyshell.ModifiedInterpreter.runcommand. Until patched, avoid loading pickle files from untrusted sources even if Picklescan reports them as safe.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-j343-8v2j-ff7w
Osv Schema Version
1.4.0
Aliases
["CVE-2025-71357"]
Ecosystems
["PyPI"]
Database Specific Severity
HIGH
Cvss Version
4.0

Threat ID: 6aa47eb655bf5e2cf5857961

Added to database: 09/11/2026, 22:20:38 UTC

Last enriched: 09/11/2026, 22:47:10 UTC

Last updated: 09/12/2026, 02:01:23 UTC

Views: 6

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses