Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2025-64512: CWE-502: Deserialization of Untrusted Data in pdfminer pdfminer.six

0
High
VulnerabilityCVE-2025-64512cvecve-2025-64512cwe-502
Published: Mon Nov 10 2025 (11/10/2025, 21:58:37 UTC)
Source: CVE Database V5
Vendor/Project: pdfminer
Product: pdfminer.six

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.

AI-Powered Analysis

AILast updated: 11/24/2025, 23:13:07 UTC

Technical Analysis

CVE-2025-64512 is a deserialization vulnerability classified under CWE-502 affecting pdfminer.six, a widely used Python library for extracting information from PDF documents. The vulnerability stems from the CMapDB._load_data() function, which deserializes data using Python's pickle.loads() method. Normally, pdfminer.six loads trusted pickle files from its internal cmap/ directory. However, a malicious PDF can specify an alternative directory and filename ending with .pickle.gz, tricking the library into loading and deserializing an attacker-controlled, compressed pickle file. Since pickle deserialization can execute arbitrary Python code, this leads to remote code execution when the malicious PDF is processed. The vulnerability affects all versions before 20251107, which includes the latest releases prior to the patch. The attack vector requires a user or system to open or process a crafted PDF file, making user interaction necessary. The CVSS v3.1 score is 8.6 (high), reflecting the vulnerability's potential to compromise confidentiality, integrity, and availability with low attack complexity and no privileges required. Although no exploits are currently known in the wild, the vulnerability poses a significant risk to any environment using pdfminer.six for PDF processing, especially automated systems handling untrusted documents. The patch fixes the issue by removing or securing the unsafe deserialization mechanism.

Potential Impact

For European organizations, this vulnerability presents a serious risk, especially for those relying on pdfminer.six in automated document processing, data extraction, or security scanning workflows. Successful exploitation can lead to arbitrary code execution, allowing attackers to gain control over affected systems, steal sensitive data, alter or destroy information, and disrupt operations. This could impact sectors such as finance, government, healthcare, and legal services where PDF documents are frequently processed. The requirement for user interaction (opening or processing a malicious PDF) means phishing or social engineering could be used to deliver the payload. The vulnerability's ability to affect confidentiality, integrity, and availability simultaneously makes it a critical concern for data protection and compliance with regulations like GDPR. Additionally, the supply chain risk is notable if pdfminer.six is embedded in third-party applications used by European entities.

Mitigation Recommendations

The primary mitigation is to upgrade pdfminer.six to version 20251107 or later, which addresses the unsafe deserialization flaw. Organizations should audit their environments to identify all instances of pdfminer.six usage, including embedded or indirect dependencies in other software. Restricting file system access for pdfminer.six processes to trusted directories can reduce the risk of loading malicious pickle files. Implement strict input validation and sandboxing around PDF processing workflows to limit exposure. Employ endpoint protection and monitoring to detect anomalous behavior indicative of exploitation attempts. Educate users about the risks of opening untrusted PDF files and implement email filtering to block suspicious attachments. For environments where immediate upgrade is not feasible, consider disabling or isolating PDF processing components that use pdfminer.six until patched. Regularly review and update incident response plans to include scenarios involving malicious PDF-based code execution.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2025-11-05T21:15:39.399Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 6912626244f28dbfe990a14d

Added to database: 11/10/2025, 10:08:34 PM

Last enriched: 11/24/2025, 11:13:07 PM

Last updated: 12/26/2025, 12:08:27 AM

Views: 165

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats