CVE-2025-64512

HIGH

pdfminer.six < 20251107 - Remote Code Execution via Malicious Pickle File Deserialization

Title source: llm
STIX 2.1

Exploitation Summary

EIP tracks 10 public exploits for CVE-2025-64512. PoCs published by adminlove520, luigigubello, 0xN4no.

AI-analyzed exploit summary This repository contains a functional exploit for CVE-2025-64512, leveraging a polyglot file that is both a valid PDF and a malicious pickle.gz to achieve remote code execution via deserialization in pdfminer.six. The PoC generates a payload that bypasses the need for an attacker to know the exact filepath of the malicious pickle file.

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.

Exploits (10)

github WORKING POC 2 stars
by adminlove520 · pythonpoc
https://github.com/adminlove520/CVE-Poc_All_in_One/tree/main/2025/CVE-2025-64512

This repository contains a functional exploit for CVE-2025-64512, leveraging a polyglot file that is both a valid PDF and a malicious pickle.gz to achieve remote code execution via deserialization in pdfminer.six. The PoC generates a payload that bypasses the need for an attacker to know the exact filepath of the malicious pickle file.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: pdfminer.six version 20250506
No auth needed
Prerequisites: Vulnerable version of pdfminer.six installed · Ability to provide the polyglot file to the target system
mistral-large-3 · analyzed Feb 27, 2026 Full analysis →
nomisec WORKING POC 2 stars
by luigigubello · poc
https://github.com/luigigubello/CVE-2025-64512-Polyglot-PoC

This PoC generates a polyglot file that is both a valid PDF and a malicious pickle.gz file to exploit CVE-2025-64512 in pdfminer.six, achieving remote code execution via deserialization.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: pdfminer.six (versions up to 20250506)
No auth needed
Prerequisites: Target system must process the malicious PDF file · Target system must have the polyglot file accessible
mistral-large-3 · analyzed Feb 16, 2026 Full analysis →
github WORKING POC
by 0xN4no · pythonpoc
https://github.com/0xN4no/cve-pocs/tree/main/CVE-2025-64512

This PoC exploits an insecure pickle deserialization vulnerability (CVE-2025-64512) in pdfminer.six < 20251107, where a crafted PDF's /Encoding field can trigger arbitrary code execution via a malicious pickle file loaded from an attacker-controlled path.

Classification
Working Poc 99%
Attack Type
Deserialization
Complexity
Moderate
Reliability
Reliable
Target: pdfminer.six versions prior to 20251107
No auth needed
Prerequisites: Attacker must be able to upload a .pickle.gz file to a known path on the target server · Target must process the malicious PDF using a vulnerable version of pdfminer.six
mistral-large-3 · analyzed Jul 31, 2026 Full analysis →
github WORKING POC
by saadhassan77 · pythonpoc
https://github.com/saadhassan77/CVE-2025-64512---pdfminer.six-Remote-Code-Execution-RCE-

This repository provides a functional PoC for CVE-2025-64512, a deserialization vulnerability in pdfminer.six <= 20250506. The exploit leverages malicious PDFs with crafted /Encoding or /CMap references to trigger pickle deserialization, enabling arbitrary code execution via a reverse shell payload.

Classification
Working Poc 98%
Attack Type
Deserialization
Complexity
Moderate
Reliability
Reliable
Target: pdfminer.six <= 20250506
No auth needed
Prerequisites: Target must use a vulnerable version of pdfminer.six · Target must process uploaded PDFs with pdfminer.six · Attacker must have network access to upload files and receive reverse shell
mistral-large-3 · analyzed Jul 28, 2026 Full analysis →
nomisec WORKING POC
by stoic-crawler · poc
https://github.com/stoic-crawler/CVE-2025-64512

This PoC exploits a deserialization vulnerability (CVE-2025-64512) in pdfminer.six by crafting a malicious PDF that references a gzip-compressed Python pickle file. When processed, the pickle's __reduce__ method triggers arbitrary command execution, demonstrated via a reverse shell.

Classification
Working Poc 98%
Attack Type
Deserialization
Complexity
Moderate
Reliability
Reliable
Target: pdfminer.six (vulnerable versions)
No auth needed
Prerequisites: Target must process uploaded PDFs using a vulnerable pdfminer.six version · Attacker must know the absolute path to the uploaded pickle file on the target · Target must allow file uploads and serve them from a predictable location
mistral-large-3 · analyzed Jul 23, 2026 Full analysis →
nomisec WRITEUP
by Cosm3No1de · poc
https://github.com/Cosm3No1de/Bedside.htb_solved

Technical writeup detailing the exploitation of CVE-2025-64512, a deserialization vulnerability in pdfminer.six allowing arbitrary pickle payload execution via path traversal in CMap files. The writeup also covers subsequent LPE via Vite path traversal and torch.load() deserialization.

Classification
Writeup 98%
Attack Type
Deserialization
Complexity
Moderate
Reliability
Reliable
Target: pdfminer.six (CVE-2025-64512), Vite dev server, PyTorch torch.load()
No auth needed
Prerequisites: Access to vulnerable pdfminer.six instance · Ability to upload crafted PDF/CMap files · Container escape via shared host directory · Sudo privileges for torch.load() script on host
mistral-large-3 · analyzed Jul 22, 2026 Full analysis →
github WORKING POC
by MehdiChyhab · pythonpoc
https://github.com/MehdiChyhab/CVE-2025-64512-exploit

This exploit targets CVE-2025-64512, a remote code execution vulnerability in pdfminer.six versions prior to 20251107. The exploit leverages insecure pickle deserialization via a malicious PDF that specifies an attacker-controlled .pickle.gz file path, enabling arbitrary command execution.

Classification
Working Poc 98%
Attack Type
Deserialization
Complexity
Moderate
Reliability
Reliable
Target: pdfminer.six < 20251107
No auth needed
Prerequisites: Target must process uploaded PDFs using a vulnerable version of pdfminer.six · Attacker must have access to an upload endpoint that accepts PDF and pickle files · Target must have Python's pickle module available for deserialization
mistral-large-3 · analyzed Jul 22, 2026 Full analysis →
github WORKING POC
by BardLaudian · pythonpoc
https://github.com/BardLaudian/CVE-2025-64512

This repository provides a functional exploit for CVE-2025-64512, an insecure deserialization vulnerability in pdfminer.six via crafted PDFs. The exploit generates a malicious PDF and pickle.gz payload to achieve arbitrary code execution when the PDF is processed by vulnerable versions of pdfminer.six.

Classification
Working Poc 99%
Attack Type
Deserialization
Complexity
Moderate
Reliability
Reliable
Target: pdfminer.six ≤ 20250506 (also affects markitdown ≤ 0.1.3, pdfplumber ≤ 0.11.7)
No auth needed
Prerequisites: Attacker must be able to place a malicious .pickle.gz file at a predictable path on the target filesystem · Target must process the crafted PDF using a vulnerable version of pdfminer.six or a dependent tool
mistral-large-3 · analyzed Jul 21, 2026 Full analysis →
nomisec WORKING POC
by joeack123 · poc
https://github.com/joeack123/PoC-for-CVE-2025-64512

This PoC exploits a deserialization vulnerability in pdfminer.six by crafting a malicious PDF with a specially crafted /Encoding path pointing to a gzipped pickle file. When processed, the pickle file deserializes and executes arbitrary commands via os.system.

Classification
Working Poc 98%
Attack Type
Deserialization
Complexity
Moderate
Reliability
Reliable
Target: pdfminer.six (CVE-2025-64512)
No auth needed
Prerequisites: Victim must process the malicious PDF using a vulnerable version of pdfminer.six · Attacker must host the malicious pickle file at a predictable path accessible to the victim
mistral-large-3 · analyzed Jul 22, 2026 Full analysis →
github WORKING POC
by matesz44 · pythonpoc
https://github.com/matesz44/CVE-2025-64512

This repository provides a functional PoC for CVE-2025-64512, a deserialization vulnerability in pdfminer.six where a crafted PDF with a malicious `Encoding` path triggers arbitrary pickle deserialization, leading to remote code execution. The exploit generates a gzipped pickle file with a user-supplied command and a PDF that references its absolute path.

Classification
Working Poc 98%
Attack Type
Deserialization
Complexity
Moderate
Reliability
Reliable
Target: pdfminer.six (vulnerable versions up to fix for CVE-2025-64512)
No auth needed
Prerequisites: Attacker must place the malicious pickle file in a predictable filesystem location accessible to the target · Target must process the crafted PDF using a vulnerable version of pdfminer.six
mistral-large-3 · analyzed Jul 19, 2026 Full analysis →

Scores

CVSS v3 8.6
EPSS 0.0031
EPSS Percentile 23.8%
Attack Vector LOCAL
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H

CISA SSVC

Vulnrichment
Exploitation poc
Automatable no
Technical Impact total

Details

CWE
CWE-502
Status published
Products (3)
debian/debian_linux 11.0
pdfminer/pdfminer.six < 2025-11-07
pypi/pdfminer.six 0 - 20251107PyPI
Published Nov 10, 2025
Tracked Since Feb 18, 2026