Picklescan arbitrary file write via distutils blocklist bypass

Severity: critical · CVSS 9.8 · Published 2026-06-17

Picklescan, a security tool used to scan Python pickle files for malicious code, is itself vulnerable to a flaw that allows arbitrary file writing. An attacker can provide a specially crafted file that bypasses the tool's security filters to overwrite critical system files. This could lead to a complete system takeover, permanent data loss, or a total service outage.

Technologies: picklescan (PyPI). Vendors: PyPI.

Quick answers

Is This vulnerability exploited in the wild?
No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.
How severe is This vulnerability?
Critical severity, with a CVSS score of 9.8, published 17 June 2026.
Which products and versions are affected?
picklescan (PyPI) < 0.0.33.
Is there a fix for This vulnerability?
A patch was published on 2026-06-18: Duplicate advisory GHSA-rmpp-8wf5-xx5q withdrawn in favor of original report Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is This vulnerability attacked?
It is attacked over the network, in a software library.
Am I affected?
Check whether you run picklescan (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

Picklescan before version 0.0.33 is vulnerable to an arbitrary file writing flaw due to an incomplete 'dangerous' blocklist. While the tool attempts to block functions like open() and shutil to prevent malicious file operations during scanning, it fails to include the distutils.file_util.write_file module. An attacker can exploit this by crafting a malicious pickle object that utilizes the unblocked distutils module. When Picklescan processes this object, it can be forced to overwrite arbitrary files on the host system, such as SSH keys or configuration files, enabling denial of service or remote code execution. This is a deserialization vulnerability (CWE-502) that can be triggered remotely without authentication if the tool is used to scan untrusted input.

Affected products

  • mmaitre314 picklescan < 0.0.33

Timeline

  • 2025-12-26: advisory: Original advisory GHSA-m273-6v24-x4m4 published
  • 2026-06-17: disclosed: CVE-2025-71321 assigned and published
  • 2026-06-18: patched: Duplicate advisory GHSA-rmpp-8wf5-xx5q withdrawn in favor of original report

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.