GHSA-m7j5-r2p5-c39r: picklescan vulnerable to arbitrary file create using logging.FileHandler
Summary Unsafe pickle deserialization allows unauthenticated attackers to perform Arbitrary File Creation. By chaining the logging.FileHandler class, an attacker can bypass RCE-focused blocklists to create empty files on the server. The vulnerability allows creating zero-byte files in arbitrary locations but does not permit overwriting or modifying existing files.
Published Feb 2, 2026 · Updated Jul 21, 2026
Affected packages
picklescan
- Ecosystem
- PyPI
- Affected
- < 1.0.1
- Fixed in
- 1.0.1
- Check
pip show picklescan
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Summary
Unsafe pickle deserialization allows unauthenticated attackers to perform Arbitrary File Creation. By chaining the logging.FileHandler class, an attacker can bypass RCE-focused blocklists to create empty files on the server. The vulnerability allows creating zero-byte files in arbitrary locations but does not permit overwriting or modifying existing files.
Details
The application deserializes untrusted pickle data. While RCE keywords may be blocked, the exploit abuses standard library features:
logging.FileHandler: The exploit instantiates this class using its default behavior (append mode).
Behavior on Existing Files: If the target file already exists, the handler opens it without modifying its content, resulting in no impact to existing data.
Behavior on Non-Existent Files: If the target file does not exist, the handler creates a new zero-byte file with the specified name.
PoC
import pickle
class WriteFile:
def __reduce__(self):
from logging import FileHandler
return (FileHandler, ('evil.log',))
with open("bypass_write.pkl", "wb") as f:
pickle.dump(WriteFile(), f)
handler = pickle.loads(pickle.dumps(WriteFile()))Impact
This primitive can be used for Filesystem Pollution or Logic Disruption. For example, an attacker could create specific "lock files" (e.g., maintenance.lock, .lock) that the application checks for, potentially triggering a Denial of Service (DoS) or preventing the application from starting.
Credited to ez-lbz.
References
- https://github.com/mmaitre314/picklescan/security/advisories/GHSA-m7j5-r2p5-c39r
- https://github.com/mmaitre314/picklescan/pull/60
- https://github.com/mmaitre314/picklescan/commit/4d9bc9cd34bca8672dad3481cd4556d5ba747156
- https://github.com/mmaitre314/picklescan/releases/tag/v1.0.1
- https://github.com/pypa/advisory-database/tree/main/vulns/picklescan/PYSEC-2026-225.yaml
- https://www.vulncheck.com/advisories/picklescan-arbitrary-file-creation-via-logging-filehandler-deserialization
- https://github.com/advisories/GHSA-m7j5-r2p5-c39r
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More PyPI vulnerabilities
All PyPI entriesCVE-2026-3490
PickleScan's pkgutil.resolve_name has a universal blocklist bypass
critical10.0Mar 3, 2026CVE-2026-53873
PickleScan's profile.run blocklist mismatch allows exec() bypass
critical9.8Mar 3, 2026CVE-2026-56315
PickleScan has multiple stdlib modules with direct RCE not in blocklist
critical9.8Mar 3, 2026CVE-2026-53875
Picklescan (scan_pytorch) Bypass via dynamic eval MAGIC_NUMBER
high7.1Feb 18, 2026CVE-2026-53874
picklescan missing detection by simple obfuscation of a `builtins.eval` call
high8.9Feb 2, 2026CVE-2026-53872
picklescan has Arbitrary file read using `io.FileIO`
high7.5Jan 8, 2026
