VYPR
High severity8.9NVD Advisory· Published Jun 17, 2026· Updated Jun 17, 2026

picklescan - Arbitrary File Writing via distutils Module Bypass

CVE-2025-71321

Description

picklescan before 0.0.33 contains an arbitrary file writing vulnerability that allows attackers to bypass the dangerous blocklist by using distutils.file_util.write_file. Attackers can construct malicious pickle objects to overwrite critical system files and achieve denial of service or remote code execution.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Affected products

1

Patches

Vulnerability mechanics

Root cause

"The dangerous blocklist in picklescan does not include the `distutils` module, allowing `distutils.file_util.write_file` to bypass protections and write arbitrary files."

Attack vector

An attacker crafts a malicious pickle file whose `__reduce__` method returns `distutils.file_util.write_file` along with a target file path and content. When picklescan scans this pickle, the dangerous blocklist does not flag `distutils`, allowing the file write operation to execute. This can overwrite critical system files such as `.ssh/authorized_keys` or web server configurations, leading to denial of service or remote code execution [ref_id=1].

Affected code

The vulnerability lies in picklescan's dangerous blocklist, which includes `open()` and `shutil` but fails to block the `distutils` module. An attacker can use `distutils.file_util.write_file` to write arbitrary files, bypassing the existing protections [ref_id=1].

What the fix does

The advisory recommends adding `distutils` to the dangerous blocklist. Without a published patch, the fix would ensure that `distutils.file_util.write_file` is treated as a dangerous function and blocked during pickle scanning, preventing arbitrary file writes [ref_id=1].

Preconditions

  • inputThe attacker must supply a malicious pickle file to a system running picklescan before version 0.0.33.
  • configThe target system must have picklescan configured to scan pickle files without blocking the distutils module.

Generated on Jun 18, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

7

News mentions

0

No linked articles in our index yet.