PyPI: pdfminer-six

CVE-2025-64512

Safety vulnerability ID: SFTY-20251107-87478

Safety legacy ID: pyup.io-81486

Affected versions of the pdfminer.six package are vulnerable to Deserialization of Untrusted Data due to the CMapDB._load_data() method invoking pickle.loads() on a PDF-controlled CMap file path. The CMapDB._load_data() routine constructs a *.pickle.gz filename from the /Encoding CMap name and joins it with a directory, but attacker-chosen or absolute paths can be resolved and the gzip content is passed directly to pickle.loads(), enabling execution of pickled objects.

Created at: Jul 5, 2026Updated at: Jul 5, 2026

Overview

Arbitrary Code Execution in pdfminer.six via Crafted PDF Input

Advisory

Affected versions of the pdfminer.six package are vulnerable to Deserialization of Untrusted Data due to the CMapDB._load_data() method invoking pickle.loads() on a PDF-controlled CMap file path. The CMapDB._load_data() routine constructs a *.pickle.gz filename from the /Encoding CMap name and joins it with a directory, but attacker-chosen or absolute paths can be resolved and the gzip content is passed directly to pickle.loads(), enabling execution of pickled objects.

Affected Package

Affecting pdfminer-six package, versions<20251107

Also affects

---

How to Fix

Upgradepdfminer-sixto20251107or higher.

Mitigation and Workarounds

---

Vulnerable Functions

Functions linked to known vulnerabilities.

Vulnerable function data is available for Enterprise customers

Book a call with us to see Safety in action.

Safety

Verified by Safety

Our Cybersecurity Intelligence Team reviewed this vulnerability. We combine public data with our own research to find issues not yet reported to public sources.

Learn more