GHSA-m7j5-r2p5-c39r: Picklescan Picklescan Vulnerable To Arbitrary File Vulnerability
MODERATEGHSA-m7j5-r2p5-c39r is a MODERATE picklescan vulnerable to arbitrary file vulnerability (CWE-502: Deserialization of Untrusted Data) affecting Picklescan libraries in the PyPI ecosystem. The issue involves picklescan vulnerable to arbitrary file create using logging.filehandler. Remediation is available by upgrading affected packages to version 1.0.1.
GHSA-m7j5-r2p5-c39r at a Glance
How to Fix GHSA-m7j5-r2p5-c39r
To remediate this vulnerability, upgrade all affected Picklescan dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install picklescan>=1.0.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show picklescan
How to Check if You Are Affected
To determine whether your Python environment is affected by GHSA-m7j5-r2p5-c39r, inspect your installed packages using pip:
pip show picklescan
Analyze the terminal output to locate any version of Picklescan in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.1), your application is affected.
Note: The pip show picklescan command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-502: Deserialization of Untrusted Data, where the product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. In Picklescan, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-m7j5-r2p5-c39r Affected Picklescan Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
picklescan
|
PyPI |
< 1.0.1
|
1.0.1
|
References
Frequently Asked Questions
What is GHSA-m7j5-r2p5-c39r?
Which Picklescan versions are affected?
What version fixes GHSA-m7j5-r2p5-c39r?
Is picklescan affected?
What CWE is associated with GHSA-m7j5-r2p5-c39r?
How can I check PyPI dependencies for GHSA-m7j5-r2p5-c39r?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-m7j5-r2p5-c39r",
"modified" : "2026-07-21T14:45:10Z",
"published" : "2026-02-02T20:50:30Z",
"aliases" : [ ],
"summary" : "picklescan vulnerable to arbitrary file create using logging.FileHandler",
"details" : "### Summary\nUnsafe 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.\n\n### Details\nThe application deserializes untrusted pickle data. While RCE keywords may be blocked, the exploit abuses standard library features:\n\nlogging.FileHandler: The exploit instantiates this class using its default behavior (append mode).\n\nBehavior on Existing Files: If the target file already exists, the handler opens it without modifying its content, resulting in no impact to existing data.\n\nBehavior on Non-Existent Files: If the target file does not exist, the handler creates a new zero-byte file with the specified name.\n\n### PoC\n```python\nimport pickle\n\nclass WriteFile:\n def __reduce__(self):\n from logging import FileHandler\n return (FileHandler, ('evil.log',))\n \nwith open(\"bypass_write.pkl\", \"wb\") as f:\n pickle.dump(WriteFile(), f)\n\nhandler = pickle.loads(pickle.dumps(WriteFile()))\n```\n<img width=\"1201\" height=\"140\" alt=\"313e1cfacbe700e27b6875e49808c52a\" src=\"https://github.com/user-attachments/assets/8873bb54-0f98-41aa-8e7c-a38a245ca428\" />\n\n\n### Impact\nThis 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.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:P"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "picklescan"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.0.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/mmaitre314/picklescan/security/advisories/GHSA-m7j5-r2p5-c39r"
}, {
"type" : "WEB",
"url" : "https://github.com/mmaitre314/picklescan/pull/60"
}, {
"type" : "WEB",
"url" : "https://github.com/mmaitre314/picklescan/commit/4d9bc9cd34bca8672dad3481cd4556d5ba747156"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/mmaitre314/picklescan"
}, {
"type" : "WEB",
"url" : "https://github.com/mmaitre314/picklescan/releases/tag/v1.0.1"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/picklescan/PYSEC-2026-225.yaml"
}, {
"type" : "WEB",
"url" : "https://www.vulncheck.com/advisories/picklescan-arbitrary-file-creation-via-logging-filehandler-deserialization"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-502" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-02-02T20:50:30Z",
"nvd_published_at" : null
}
}