Executive brief
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.
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