CVE-2025-1716

9.8 CRITICAL

📋 TL;DR

CVE-2025-1716 is a critical vulnerability in picklescan versions before 0.0.21 where the tool fails to restrict the 'pip' global during pickle file scanning. This allows attackers to embed malicious code in pickle files that downloads and executes arbitrary PyPI packages, bypassing security checks. Anyone using picklescan to validate pickle files from untrusted sources is affected.

💻 Affected Systems

Products:
  • picklescan
Versions: All versions before 0.0.21
Operating Systems: All operating systems where picklescan runs
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems using picklescan to scan pickle files from untrusted sources. The vulnerability is in the scanner itself, not in systems loading pickle files directly.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to complete system compromise, data exfiltration, and lateral movement within the network.

🟠

Likely Case

Arbitrary package installation leading to malware deployment, data theft, or backdoor installation.

🟢

If Mitigated

Limited impact if pickle files are only loaded from trusted sources and network egress is restricted.

🌐 Internet-Facing: HIGH - Attackers can craft malicious pickle files and distribute them through various channels to target systems.
🏢 Internal Only: MEDIUM - Risk exists if pickle files from untrusted internal sources are processed, but attack surface is reduced.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires convincing a target to scan a malicious pickle file. The advisory includes proof-of-concept examples showing how to craft malicious pickle files.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 0.0.21

Vendor Advisory: https://github.com/mmaitre314/picklescan/security/advisories/GHSA-655q-fx9r-782v

Restart Required: No

Instructions:

1. Update picklescan to version 0.0.21 or later using pip: 'pip install --upgrade picklescan>=0.0.21' 2. Verify the update completed successfully.

🔧 Temporary Workarounds

Restrict network egress

all

Block outbound connections to PyPI and GitHub from systems running picklescan to prevent package downloads.

# Use firewall rules to block outbound traffic to pypi.org, files.pythonhosted.org, github.com

Use alternative scanning

all

Temporarily use alternative pickle scanning tools or manual inspection until patched.

🧯 If You Can't Patch

  • Only scan pickle files from trusted, verified sources with known integrity
  • Run picklescan in isolated, sandboxed environments with no network access

🔍 How to Verify

Check if Vulnerable:

Run 'picklescan --version' and check if version is below 0.0.21

Check Version:

picklescan --version

Verify Fix Applied:

Run 'picklescan --version' and confirm version is 0.0.21 or higher

📡 Detection & Monitoring

Log Indicators:

  • Unusual pip install activity during pickle scanning
  • Network connections to PyPI/GitHub from picklescan processes

Network Indicators:

  • Outbound HTTP/HTTPS traffic to pypi.org or github.com from systems running picklescan

SIEM Query:

process_name:"picklescan" AND (destination_ip:pypi.org OR destination_ip:github.com)

🔗 References

📤 Share & Export