
CVE-2025-64512 - pdfminer.six Remote Code Execution Exploit
This repository contains a proof-of-concept exploit for CVE-2025-64512, a critical vulnerability in pdfminer.six versions prior to 20251107.
The vulnerability allows an attacker to achieve Remote Code Execution (RCE) by uploading a malicious PDF that triggers insecure deserialization via Python's pickle.load().
This exploit is for educational and authorized testing purposes only.
Use only on systems you own or have explicit permission to test.
The author is not responsible for any misuse.
| CVE ID | CVE-2025-64512 |
|---|---|
| Affected Library | pdfminer.six |
| Versions | < 20251107 |
| Type | Remote Code Execution (RCE) |
| Vector | Insecure deserialization via pickle.load() |
The CMapDB._load_data() function in pdfminer.six loads CMap resources using pickle.loads(). A malicious PDF can specify an arbitrary path to a .pickle.gz file, which gets deserialized and executes arbitrary code.
git clone https://github.com/MehdiChyhab/CVE-2025-64512-exploit.git
cd CVE-2025-64512-exploit
pip install -r requirements.txt