CVE-2025-64512 pdfminer.six vulnerable to Arbitrary Code Execution via Crafted PDF Input
Attackers can execute arbitrary code by providing a malicious PDF that triggers unsafe pickle deserialization in pdfminer.six.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2025-64512?
CVE-2025-64512 is a high-severity unsafe deserialization vulnerability in Debian Debian Linux, published on 10 Nov 2025. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Official description
Pdfminer.six is a community maintained fork of the original PDFMiner, a tool for extracting information from PDF documents. Prior to version 20251107, pdfminer.six will execute arbitrary code from a malicious pickle file if provided with a malicious PDF file. The `CMapDB._load_data()` function in pdfminer.six uses `pickle.loads()` to deserialize pickle files. These pickle files are supposed to be part of the pdfminer.six distribution stored in the `cmap/` directory, but a malicious PDF can specify an alternative directory and filename as long as the filename ends in `.pickle.gz`. A malicious, zipped pickle file can then contain code which will automatically execute when the PDF is processed. Version 20251107 fixes the issue.
Weakness: CWE-502
Which versions are affected by CVE-2025-64512?
3 open source packages ship an affected version, including pdfminer-six and pdfminer.six. It affects 2 products.
| Package | Affected | Fixed in |
|---|---|---|
pdfminer-six PyPI | All versions | 20251107 |
pdfminer-six PyPI | All versions | 20251107 |
pdfminer.six PyPI | All versions | 20251107 |
Linux distribution packages (1)
python-pdfminer.six openSUSE:Tumbleweed | All versions | 20251107-1.1 |
Products include Debian Debian Linux, Pdfminer Pdfminer.six.
How do I fix CVE-2025-64512?
Upgrade pdfminer-six to 20251107 or later.
Upgrade, and only deserialise data from trusted sources or with an allow-list of types. More about Unsafe deserialization.
Is CVE-2025-64512 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-64512 exists.
Public exploit code: 10 proofs of concept on GitHub.
Other vulnerabilities in Debian Debian Linux
Sources
Also known as DEBIAN-CVE-2025-64512, DLA-4374-1, DSA-6062-1, GHSA-wf5f-4jwr-ppcp, PYSEC-2026-1762, ROOT-APP-PYPI-CVE-2025-64512 and 3 more.