CVE-2025-71351: Picklescan Remote Code Execution via timeit Library

picklescan Updated 01 Oct 2026

Summary

01/10/2026
Yes i
Medium
5.3

CVE-2025-71351: Picklescan missing detection when calling built-in python library function timeit.timeit(). Affects picklescan versions < 0.0.25. Fixed in 0.0.25. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Picklescan is a Python library designed to detect malicious pickle files, particularly in machine learning models. It aims to enhance security by scanning for unsafe deserialization practices that could lead to remote code execution. However, due to its reliance on a blacklist of unsafe globals, it may fail to detect certain vulnerabilities, such as those involving built-in Python library functions.

Vulnerability Detail

The vulnerability arises from Picklescan's inability to detect malicious payloads that utilize the built-in timeit.timeit() function during the deserialization process of pickle files. Attackers can exploit this by crafting a payload that calls timeit.timeit() within the reduce method of a class, allowing them to execute arbitrary OS commands undetected. This poses a significant risk as it enables remote code execution when a victim unknowingly loads a malicious pickle file.

How To Fix

Latest published version: 1.0.5 as of 22 Oct 2026

pip install --upgrade "picklescan==1.0.5"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.0.25

This is the first release that contains the fix.

pip install --upgrade "picklescan==0.0.25"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, users can manually check the contents of pickle files before loading them, or implement additional security measures such as using a custom deserialization method that restricts the execution of certain functions.

Conclusion

The vulnerability CVE-2025-71351 in the Picklescan library highlights a significant security risk associated with the deserialization of pickle files. By exploiting the timeit library, attackers can execute arbitrary code undetected. It is crucial for users to update to the patched version and consider additional security measures to mitigate this risk.

See every vulnerability recorded for picklescan →

Share this vulnerability

FAQ

The vulnerability allows attackers to execute arbitrary code by exploiting the timeit.timeit() function during the deserialization of pickle files.

You can use Vulert's playground at Vulert Scanner to check if your application is affected without requiring signup.

If exploited, this vulnerability can lead to remote code execution, allowing attackers to run arbitrary commands on the victim's system.

Yes, updating to Picklescan version 0.0.25 or later addresses this vulnerability.

Consider implementing additional security measures or manually inspecting pickle files before loading them as a temporary workaround.

Related vulnerabilities

Recent vulnerabilities recorded for picklescan.

How To Fix

Latest published version: 1.0.5 as of 22 Oct 2026

pip install --upgrade "picklescan==1.0.5"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.0.25

This is the first release that contains the fix.

pip install --upgrade "picklescan==0.0.25"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback