CVE-2025-64512: CWE-502: Deserialization of Untrusted Data in pdfminer pdfminer.six
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 Analysis
Technical Summary
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.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Italy
CVE-2025-64512: CWE-502: Deserialization of Untrusted Data in pdfminer 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
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.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
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 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
CVE-2025-15091: Buffer Overflow in UTT 进取 512W
HighCVE-2025-14913: CWE-862 Missing Authorization in wpshuffle Frontend Post Submission Manager Lite – Frontend Posting WordPress Plugin
MediumCVE-2025-15089: Buffer Overflow in UTT 进取 512W
HighCVE-2025-14820
UnknownCVE-2025-14715
UnknownActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.