picklescan vulnerable to arbitrary file create using logging.FileHandler
Key facts
- Attack vector
- —
- Privileges required
- —
- User interaction
- —
- Attack complexity
- —
- Impact type
- Code execution
- Confidentiality · integrity · availability
- —
- Fix status
- Fixed
No CVSS vector from any source. Fix status from GitHub. Impact type from CWE-502.
Summary
### 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 ```python 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())) ``` <img width="1201" height="140" alt="313e1cfacbe700e27b6875e49808c52a" src="https://github.com/user-attachments/assets/8873bb54-0f98-41aa-8e7c-a38a245ca428" /> ### 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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | picklescan (PyPI) | before 1.0.1 | 1.0.1 | Patch available | GHSA-m7j5-r2p5-c39r |
- picklescan (PyPI) Vendor— Affected before 1.0.1 Fixed in 1.0.1 Patch available GHSA-m7j5-r2p5-c39r
Remediation
- Fix · GHSA-m7j5-r2p5-c39r picklescan (PyPI) Fixed in 1.0.1 Advisory →
Timeline
- 2026-10-03 Threatist record created from GHSA-m7j5-r2p5-c39r
References
Other 6
- 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
- https://github.com/mmaitre314/picklescan/releases/tag/v1.0.1
- https://github.com/pypa/advisory-database/tree/main/vulns/picklescan/PYSEC-2026-225.yaml
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences