PyPI: pdfminer-six
CVE-2025-70559
Safety vulnerability ID: SFTY-20251110-96519
Safety legacy ID: pyup.io-81495
Affected versions of the pdfminer.six package are vulnerable to Deserialization of Untrusted Data due to the CMap loader deserializing untrusted .pickle.gz files with Python’s pickle. In pdfminer.cmapdb._load_data, the code calls pickle.loads on CMap data discovered via CMapDB.get_cmap from directories in the CMAP_PATH search path without validation or restriction, allowing attacker-supplied object payloads to be executed.
Overview
Insecure Deserialization (pickle) in pdfminer.six CMap Loader — Local Privesc
Advisory
Affected versions of the pdfminer.six package are vulnerable to Deserialization of Untrusted Data due to the CMap loader deserializing untrusted .pickle.gz files with Python’s pickle. In pdfminer.cmapdb._load_data, the code calls pickle.loads on CMap data discovered via CMapDB.get_cmap from directories in the CMAP_PATH search path without validation or restriction, allowing attacker-supplied object payloads to be executed.
How to Fix
Mitigation and Workarounds
---
Vulnerable Functions
Functions linked to known vulnerabilities.
References
- https://getsafety.com/vulnerabilities/SFTY-20251110-96519/CVE-2025-70559
- https://github.com/pdfminer/pdfminer.six/security/advisories/GHSA-f83h-ghpp-7wcc
- https://github.com/pdfminer/pdfminer.six/commit/b808ee05dd7f0c8ea8ec34bdf394d40e63501086
- https://nvd.nist.gov/vuln/detail/CVE-2025-70559
- https://github.com/advisories/GHSA-f83h-ghpp-7wcc
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
