CVE-2025-71351
Received Received - Intake
picklescan Remote Code Execution via Timeit.timeit()

Publication date: 2026-06-21

Last updated on: 2026-06-21

Assigner: VulnCheck

Description
picklescan before 0.0.25 fails to detect malicious pickle files that use timeit.timeit() in the __reduce__ method, allowing remote code execution. Attackers can craft pickle files that import dangerous libraries like os and execute arbitrary system commands, which evade picklescan detection and execute when pickle.load() is called.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-06-21
Last Modified
2026-06-21
Generated
2026-06-21
AI Q&A
2026-06-21
EPSS Evaluated
N/A
NVD
EUVD
Affected Vendors & Products
Currently, no data is known.
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-184 The product implements a protection mechanism that relies on a list of inputs (or properties of inputs) that are not allowed by policy or otherwise require other action to neutralize before additional processing takes place, but the list is incomplete.
Attack-Flow Graph
AI Quick Actions
Instant insights powered by AI
Executive Summary

The vulnerability CVE-2025-71351 affects the picklescan library versions before 0.0.25. Picklescan is designed to detect malicious Python pickle files, but it fails to detect malicious pickle files that use the timeit.timeit() function within the __reduce__ method. Attackers can craft pickle files that import dangerous libraries like os and execute arbitrary system commands. These malicious files bypass picklescan's detection and execute code when pickle.load() is called.

The root cause is that the timeit module was not included in picklescan's unsafe globals blacklist, allowing attackers to evade detection by using timeit.timeit() to execute arbitrary code remotely.

Impact Analysis

This vulnerability can lead to remote code execution on systems that use vulnerable versions of picklescan to scan pickle files. Attackers can craft malicious pickle files that execute arbitrary system commands when loaded, potentially allowing them to run harmful commands, download payloads, or compromise the affected system.

Such attacks can be distributed through supply chains, including PyTorch models or APIs that use pickle files, increasing the risk of widespread compromise.

The vulnerability has a high severity rating with a CVSS score of 7.6, indicating a significant impact if exploited.

Detection Guidance

This vulnerability involves malicious pickle files that use the timeit.timeit() function in the __reduce__ method to execute arbitrary system commands, which evade detection by picklescan versions before 0.0.25.

To detect this vulnerability on your system, you should scan pickle files for the presence of the timeit.timeit() function within their __reduce__ method or check for suspicious imports of dangerous libraries like os in pickle files.

Since picklescan before 0.0.25 fails to detect this, you can manually inspect pickle files or use updated detection tools that include timeit in their unsafe globals blacklist.

  • Use Python scripts to inspect pickle files for suspicious __reduce__ methods invoking timeit.timeit().
  • Run commands to extract and analyze pickle file contents, for example, using Python's pickletools module to disassemble pickle files and look for suspicious opcodes or function calls.
  • Example command to disassemble a pickle file: python -m pickletools suspicious_file.pkl
  • Monitor network traffic for unexpected downloads or command executions triggered by loading pickle files, especially if they involve calls to system commands or external downloads (e.g., curl).
Mitigation Strategies

The primary mitigation step is to upgrade picklescan to version 0.0.25 or later, where the detection bypass involving timeit.timeit() has been fixed by adding timeit to the unsafe globals blacklist.

Avoid loading pickle files from untrusted or unauthenticated sources, as malicious pickle files can execute arbitrary system commands upon loading.

Implement strict validation and scanning of pickle files before loading them, using updated tools that detect this specific attack vector.

Consider alternative serialization formats that do not allow code execution, such as JSON or protobuf, especially when handling data from untrusted sources.

Compliance Impact

This vulnerability allows remote code execution through malicious pickle files that evade detection by picklescan. Such unauthorized code execution can lead to data breaches or unauthorized access to sensitive information.

Consequently, organizations using vulnerable versions of picklescan may face increased risk of non-compliance with data protection regulations like GDPR and HIPAA, which require safeguarding personal and sensitive data against unauthorized access and ensuring system integrity.

Failure to detect and prevent such attacks could result in exposure of protected data, leading to potential regulatory penalties and reputational damage.

Chat Assistant
Ask questions about this CVE
Hi! I’m here to help you understand CVE-2025-71351. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70
EPSS Chart