CVE-2025-70559
Insecure Deserialization (pickle) in pdfminer.six CMap Loader — Local Privesc
pdfminer.six before 20251230 contains an insecure deserialization vulnerability in the CMap loading mechanism. The library uses Python pickle to deserialize CMap cache files without validation. An attacker with the ability to place a malicious pickle file in a location accessible to the application can trigger arbitrary code execution or privilege escalation when the file is loaded by a trusted process. This is caused by an incomplete patch to CVE-2025-64512.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
6.5
pdfminer.six before 20251230 contains an insecure deserialization vulnerability in the CMap loading mechanism. The library uses Python pickle to deserialize CMap cache files without validation. An attacker with the ability to place a malicious pickle file in a location accessible to the application can trigger arbitrary code execution or privilege escalation when the file is loaded by a trusted process. This is caused by an incomplete patch to CVE-2025-64512.
- Record
CVE-2025-70559- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N - Weakness
- CWE-502
- Updated
- 2026-11-02
EUVDEUVD-2025-206704
6.5
pdfminer.six before 20251230 contains an insecure deserialization vulnerability in the CMap loading mechanism. The library uses Python pickle to deserialize CMap cache files without validation. An attacker with the ability to place a malicious pickle file in a location accessible to the application can trigger arbitrary code execution or privilege escalation when the file is loaded by a trusted process. This is caused by an incomplete patch to CVE-2025-64512.
- Record
EUVD-2025-206704- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-f83h-ghpp-7wcc
7.8
Insecure Deserialization (pickle) in pdfminer.six CMap Loader — Local Privesc
🚀 Overview
This report demonstrates a real-world privilege escalation vulnerability in pdfminer.six due to unsafe usage of Python's pickle module for CMap file loading.
It shows how a low-privileged user can gain root access (or escalate to any service account) by exploiting insecure deserialization in a typical multi-user or server environment.
🚨 Special Note
This advisory addresses a distinct vulnerability from GHSA-wf5f-4jwr-ppcp (CVE-2025-64512).
While the previous CVE claims to mitigate issues related to unsafe deserialization, the patch introduced in commit b808ee05dd7f0c8ea8ec34bdf394d40e63501086 does not address the vulnerability reported here.
Based on testing performed against the latest version of the library (comparison view), the issue remains exploitable through local privilege escalation due to continued unsafe use of pickle files. The Dockerfile is hence modified to run test against this claim.
This demonstrates that the patch for CVE-2025-64512 is incomplete: the vulnerability remains exploitable. This advisory therefore documents a distinct, independently fixable flaw. A correct remediation must remove the dependency on pickle files (or otherwise eliminate unsafe deserialization) and replace it with a safe, auditable data-handling approach so the library can operate normally without relying on pickle
📚 Table of Contents
- 🔍 Background
- 🐍 Vulnerability Description
- 🎭 Demo Scenario
- 🧨 Technical Details
- 🔧 Setup and Usage
- 📝 Step-by-step Walkthrough
- 🛡️ Security Standards & References
🔍 Background
pdfminer.six is a popular Python library for extracting text and information from PDF files. It supports CJK (Chinese, Japanese, Korean) fonts via external CMap files, which it loads from disk using Python's pickle module.
🐍 Security Issue: If the CMap search path (
CMAP_PATHor default directories) includes a world-writable or user-writable directory, an attacker can place a malicious.pickle.gzfile that will be loaded and deserialized by pdfminer.six, leading to arbitrary code execution.
🐍 Vulnerability Description
- Component: pdfminer.six CMap loading (
pdfminer/cmapdb.py) - Issue: Loads and deserializes
.pickle.gzfiles using Python’spicklemodule, which is unsafe for untrusted data. - Exploitability: If a low-privileged user can write to any directory in
CMAP_PATH, they can execute code as the user running pdfminer—potentially root or a privileged service. - Impact: Full code execution as the service user, privilege escalation from user to root, persistence, and potential lateral movement.
🎭 Demo Scenario
Environment:
- 🐧 Alpine Linux (Docker container)
- 👨💻 Two users:
user1(attacker: low-privilege)root(victim: runs privileged PDF-processing script)
- 🗂️ Shared writable directory:
/tmp/uploads - 🛣️
CMAP_PATHset to/tmp/uploadsfor the privileged script - 📦 pdfminer.six installed system-wide
Attack Flow:
- 🕵️♂️
user1creates a malicious CMap file (Evil.pickle.gz) in/tmp/uploads. - 👑 The privileged service (
root) processes a PDF or callsget_cmap("Evil"). - 💣 The malicious pickle is…
- Record
GHSA-f83h-ghpp-7wcc- CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-502, CWE-915
- Updated
- 2026-11-02
NVD
6.5
pdfminer.six before 20251230 contains an insecure deserialization vulnerability in the CMap loading mechanism. The library uses Python pickle to deserialize CMap cache files without validation. An attacker with the ability to place a malicious pickle file in a location accessible to the application can trigger arbitrary code execution or privilege escalation when the file is loaded by a trusted process. This is caused by an incomplete patch to CVE-2025-64512.
- Record
CVE-2025-70559- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N - Weakness
- CWE-502
- Updated
- 2026-11-02
OSV
6.5
pdfminer.six before 20251230 contains an insecure deserialization vulnerability in the CMap loading mechanism. The library uses Python pickle to deserialize CMap cache files without validation. An attacker with the ability to place a malicious pickle file in a location accessible to the application can trigger arbitrary code execution or privilege escalation when the file is loaded by a trusted process. This is caused by an incomplete patch to CVE-2025-64512.
- Record
CVE-2025-70559- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N - Updated
- 2026-11-02
OSVDEBIAN-CVE-2025-70559
6.5
pdfminer.six before 20251230 contains an insecure deserialization vulnerability in the CMap loading mechanism. The library uses Python pickle to deserialize CMap cache files without validation. An attacker with the ability to place a malicious pickle file in a location accessible to the application can trigger arbitrary code execution or privilege escalation when the file is loaded by a trusted process. This is caused by an incomplete patch to CVE-2025-64512.
- Record
DEBIAN-CVE-2025-70559- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N - Updated
- 2026-11-02
Show 6 moreShow less
OSVGHSA-f83h-ghpp-7wcc
7.8
Insecure Deserialization (pickle) in pdfminer.six CMap Loader — Local Privesc
🚀 Overview
This report demonstrates a real-world privilege escalation vulnerability in pdfminer.six due to unsafe usage of Python's pickle module for CMap file loading.
It shows how a low-privileged user can gain root access (or escalate to any service account) by exploiting insecure deserialization in a typical multi-user or server environment.
🚨 Special Note
This advisory addresses a distinct vulnerability from GHSA-wf5f-4jwr-ppcp (CVE-2025-64512).
While the previous CVE claims to mitigate issues related to unsafe deserialization, the patch introduced in commit b808ee05dd7f0c8ea8ec34bdf394d40e63501086 does not address the vulnerability reported here.
Based on testing performed against the latest version of the library (comparison view), the issue remains exploitable through local privilege escalation due to continued unsafe use of pickle files. The Dockerfile is hence modified to run test against this claim.
This demonstrates that the patch for CVE-2025-64512 is incomplete: the vulnerability remains exploitable. This advisory therefore documents a distinct, independently fixable flaw. A correct remediation must remove the dependency on pickle files (or otherwise eliminate unsafe deserialization) and replace it with a safe, auditable data-handling approach so the library can operate normally without relying on pickle
📚 Table of Contents
- 🔍 Background
- 🐍 Vulnerability Description
- 🎭 Demo Scenario
- 🧨 Technical Details
- 🔧 Setup and Usage
- 📝 Step-by-step Walkthrough
- 🛡️ Security Standards & References
🔍 Background
pdfminer.six is a popular Python library for extracting text and information from PDF files. It supports CJK (Chinese, Japanese, Korean) fonts via external CMap files, which it loads from disk using Python's pickle module.
🐍 Security Issue: If the CMap search path (
CMAP_PATHor default directories) includes a world-writable or user-writable directory, an attacker can place a malicious.pickle.gzfile that will be loaded and deserialized by pdfminer.six, leading to arbitrary code execution.
🐍 Vulnerability Description
- Component: pdfminer.six CMap loading (
pdfminer/cmapdb.py) - Issue: Loads and deserializes
.pickle.gzfiles using Python’spicklemodule, which is unsafe for untrusted data. - Exploitability: If a low-privileged user can write to any directory in
CMAP_PATH, they can execute code as the user running pdfminer—potentially root or a privileged service. - Impact: Full code execution as the service user, privilege escalation from user to root, persistence, and potential lateral movement.
🎭 Demo Scenario
Environment:
- 🐧 Alpine Linux (Docker container)
- 👨💻 Two users:
user1(attacker: low-privilege)root(victim: runs privileged PDF-processing script)
- 🗂️ Shared writable directory:
/tmp/uploads - 🛣️
CMAP_PATHset to/tmp/uploadsfor the privileged script - 📦 pdfminer.six installed system-wide
Attack Flow:
- 🕵️♂️
user1creates a malicious CMap file (Evil.pickle.gz) in/tmp/uploads. - 👑 The privileged service (
root) processes a PDF or callsget_cmap("Evil"). - 💣 The malicious pickle is…
- Record
GHSA-f83h-ghpp-7wcc- CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-502, CWE-915
- Updated
- 2026-11-02
OSVOESA-2026-4210
6.5
python-pdfminer.six security update
PDF parser and analyzer.
Security Fix(es):
pdfminer.six before 20251230 contains an insecure deserialization vulnerability in the CMap loading mechanism. The library uses Python pickle to deserialize CMap cache files without validation. An attacker with the ability to place a malicious pickle file in a location accessible to the application can trigger arbitrary code execution or privilege escalation when the file is loaded by a trusted process. This is caused by an incomplete patch to CVE-2025-64512.(CVE-2025-70559)
- Record
OESA-2026-4210- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N - Updated
- 2026-11-02
OSVOESA-2026-4211
6.5
python-pdfminer.six security update
PDF parser and analyzer.
Security Fix(es):
pdfminer.six before 20251230 contains an insecure deserialization vulnerability in the CMap loading mechanism. The library uses Python pickle to deserialize CMap cache files without validation. An attacker with the ability to place a malicious pickle file in a location accessible to the application can trigger arbitrary code execution or privilege escalation when the file is loaded by a trusted process. This is caused by an incomplete patch to CVE-2025-64512.(CVE-2025-70559)
- Record
OESA-2026-4211- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N - Updated
- 2026-11-02
OSVPYSEC-2026-1761
7.8
Insecure Deserialization (pickle) in pdfminer.six CMap Loader — Local Privesc
🚀 Overview
This report demonstrates a real-world privilege escalation vulnerability in pdfminer.six due to unsafe usage of Python's pickle module for CMap file loading.
It shows how a low-privileged user can gain root access (or escalate to any service account) by exploiting insecure deserialization in a typical multi-user or server environment.
🚨 Special Note
This advisory addresses a distinct vulnerability from GHSA-wf5f-4jwr-ppcp (CVE-2025-64512).
While the previous CVE claims to mitigate issues related to unsafe deserialization, the patch introduced in commit b808ee05dd7f0c8ea8ec34bdf394d40e63501086 does not address the vulnerability reported here.
Based on testing performed against the latest version of the library (comparison view), the issue remains exploitable through local privilege escalation due to continued unsafe use of pickle files. The Dockerfile is hence modified to run test against this claim.
This demonstrates that the patch for CVE-2025-64512 is incomplete: the vulnerability remains exploitable. This advisory therefore documents a distinct, independently fixable flaw. A correct remediation must remove the dependency on pickle files (or otherwise eliminate unsafe deserialization) and replace it with a safe, auditable data-handling approach so the library can operate normally without relying on pickle
📚 Table of Contents
- 🔍 Background
- 🐍 Vulnerability Description
- 🎭 Demo Scenario
- 🧨 Technical Details
- 🔧 Setup and Usage
- 📝 Step-by-step Walkthrough
- 🛡️ Security Standards & References
🔍 Background
pdfminer.six is a popular Python library for extracting text and information from PDF files. It supports CJK (Chinese, Japanese, Korean) fonts via external CMap files, which it loads from disk using Python's pickle module.
🐍 Security Issue: If the CMap search path (
CMAP_PATHor default directories) includes a world-writable or user-writable directory, an attacker can place a malicious.pickle.gzfile that will be loaded and deserialized by pdfminer.six, leading to arbitrary code execution.
🐍 Vulnerability Description
- Component: pdfminer.six CMap loading (
pdfminer/cmapdb.py) - Issue: Loads and deserializes
.pickle.gzfiles using Python’spicklemodule, which is unsafe for untrusted data. - Exploitability: If a low-privileged user can write to any directory in
CMAP_PATH, they can execute code as the user running pdfminer—potentially root or a privileged service. - Impact: Full code execution as the service user, privilege escalation from user to root, persistence, and potential lateral movement.
🎭 Demo Scenario
Environment:
- 🐧 Alpine Linux (Docker container)
- 👨💻 Two users:
user1(attacker: low-privilege)root(victim: runs privileged PDF-processing script)
- 🗂️ Shared writable directory:
/tmp/uploads - 🛣️
CMAP_PATHset to/tmp/uploadsfor the privileged script - 📦 pdfminer.six installed system-wide
Attack Flow:
- 🕵️♂️
user1creates a malicious CMap file (Evil.pickle.gz) in/tmp/uploads. - 👑 The privileged service (
root) processes a PDF or callsget_cmap("Evil"). - 💣 The malicious pickle is…
- Record
PYSEC-2026-1761- CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVUBUNTU-CVE-2025-70559
6.5
pdfminer.six before 20251230 contains an insecure deserialization vulnerability in the CMap loading mechanism. The library uses Python pickle to deserialize CMap cache files without validation. An attacker with the ability to place a malicious pickle file in a location accessible to the application can trigger arbitrary code execution or privilege escalation when the file is loaded by a trusted process. This is caused by an incomplete patch to CVE-2025-64512.
- Record
UBUNTU-CVE-2025-70559- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N - Updated
- 2026-11-02
OSVUSN-8837-1 No score
pdfminer vulnerabilities
It was discovered that pdfminer did not safely parse specially crafted PDF files. An attacker could possibly use these issues to execute arbitrary code. (CVE-2025-64512, CVE-2025-70559)
- Record
USN-8837-1- Updated
- 2026-11-02
Affected packages
| Package | Affected | Fixed |
|---|---|---|
pdfminer-sixPyPI |
before 20251230 | 20251230 |
pdfminerDebian:12 |
All versions, plus listed versions 20221105+dfsg-120221105+dfsg-1.120221105+dfsg-1.1~deb12u120221105+dfsg-1.1~deb13u120260107+dfsg-1 |
None known |
pdfminerDebian:13 |
All versions, plus listed versions 20221105+dfsg-120221105+dfsg-1.120221105+dfsg-1.1~deb12u120221105+dfsg-1.1~deb13u120260107+dfsg-1 |
None known |
pdfminerDebian:14 |
before 20260107+dfsg-1, plus listed versions 20221105+dfsg-120221105+dfsg-1.120221105+dfsg-1.1~deb12u120221105+dfsg-1.1~deb13u1 |
20260107+dfsg-1 |
pdfminerDebian:11 |
before 20200726-1+deb11u2, plus listed versions 20200726-120200726-1+deb11u1 |
20200726-1+deb11u2 |
pdfminer-sixPyPI |
before 20251230, plus listed versions 2014091520151013201602022016061420170418 Show 30 moreShow less201704192017072020181108201910202019110720191110202001042020012120200124202004012020040220200517202007202020072620201018202110122022031920220506202205242022110520231228202407062025032420250327202504162025050620251107202512272025122820251229 |
20251230 |
python-pdfminer.sixopenEuler:24.03-LTS-SP3 |
before 20231228-4.oe2403sp3 | 20231228-4.oe2403sp3 |
python-pdfminer.sixopenEuler:24.03-LTS-SP1 |
before 20231228-4.oe2403sp1 | 20231228-4.oe2403sp1 |
pdfminerUbuntu:Pro:16.04:LTS |
before 20140328+dfsg-1ubuntu0.16.04.1~esm1, plus listed versions 20110515+dfsg-120140328+dfsg-1 |
20140328+dfsg-1ubuntu0.16.04.1~esm1 |
pdfminerUbuntu:Pro:18.04:LTS |
before 20140328+dfsg-1ubuntu0.18.04.1~esm1, plus listed versions 20140328+dfsg-1 |
20140328+dfsg-1ubuntu0.18.04.1~esm1 |
Show 9 moreShow less
| Package | Affected | Fixed |
|---|---|---|
pdfminerUbuntu:Pro:20.04:LTS |
before 20191020+dfsg-2ubuntu0.1~esm1, plus listed versions 20181108+dfsg-320191020+dfsg-120191020+dfsg-2 |
20191020+dfsg-2ubuntu0.1~esm1 |
pdfminerUbuntu:Pro:22.04:LTS |
before 20220319+dfsg-1ubuntu0.1~esm1, plus listed versions 20200726-120201018+dfsg-120220319+dfsg-1 |
20220319+dfsg-1ubuntu0.1~esm1 |
pdfminerUbuntu:Pro:24.04:LTS |
before 20221105+dfsg-1ubuntu0.1~esm1, plus listed versions 20221105+dfsg-1 |
20221105+dfsg-1ubuntu0.1~esm1 |
pdfminerUbuntu:25.10 |
All versions, plus listed versions 20221105+dfsg-1 |
None known |
pdfminerUbuntu:Pro:16.04:LTS From an advisory covering 2 CVEs |
before 20140328+dfsg-1ubuntu0.16.04.1~esm1, plus listed versions 20110515+dfsg-120140328+dfsg-1 |
20140328+dfsg-1ubuntu0.16.04.1~esm1 |
pdfminerUbuntu:Pro:18.04:LTS From an advisory covering 2 CVEs |
before 20140328+dfsg-1ubuntu0.18.04.1~esm1, plus listed versions 20140328+dfsg-1 |
20140328+dfsg-1ubuntu0.18.04.1~esm1 |
pdfminerUbuntu:Pro:20.04:LTS From an advisory covering 2 CVEs |
before 20191020+dfsg-2ubuntu0.1~esm1, plus listed versions 20181108+dfsg-320191020+dfsg-120191020+dfsg-2 |
20191020+dfsg-2ubuntu0.1~esm1 |
pdfminerUbuntu:Pro:22.04:LTS From an advisory covering 2 CVEs |
before 20220319+dfsg-1ubuntu0.1~esm1, plus listed versions 20200726-120201018+dfsg-120220319+dfsg-1 |
20220319+dfsg-1ubuntu0.1~esm1 |
pdfminerUbuntu:Pro:24.04:LTS From an advisory covering 2 CVEs |
before 20221105+dfsg-1ubuntu0.1~esm1, plus listed versions 20221105+dfsg-1 |
20221105+dfsg-1ubuntu0.1~esm1 |
Public exploits
Links only. Every CVE stores no exploit code.
| Source | Link | Date |
|---|---|---|
| PoC in GitHub | isukasanuj/CVE-2025-70559 | 2026-08-15 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV, PoC in GitHub |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2025-70559 is a medium vulnerability (CVSS 6.5) in pdfminer, published November 7, 2025. Public exploit code exists. EPSS puts the chance of exploitation in the next 30 days at 0.32%, the 25th percentile. Fixed in pdfminer-six 20251230.
References
github.com/pdfminer/pdfminer.six/security/advisories/GHSA-f83h-ghpp-7wcc
github.com/advisories/GHSA-f83h-ghpp-7wcc
github.com/pdfminer/pdfminer.six/commit/b808ee05dd7f0c8ea8ec34bdf394d40e63501086
nvd.nist.gov/vuln/detail/CVE-2025-70559
github.com/CVEProject/cvelistV5/tree/main/cves/2025/70xxx/CVE-2025-70559.json
security-tracker.debian.org/tracker/CVE-2025-70559
Show 9 moreShow less
github.com/pdfminer/pdfminer.six
openeuler.org/zh/security/security-bulletins/detail?id=openEuler-SA-2026-4210
openeuler.org/zh/security/security-bulletins/detail?id=openEuler-SA-2026-4211
pypi.org/project/pdfminer-six
ubuntu.com/security/CVE-2025-70559
cve.org/CVERecord?id=CVE-2025-70559
github.com/pdfminer/pdfminer.six/pull/1172
ubuntu.com/security/notices/USN-8837-1
ubuntu.com/security/CVE-2025-64512
Left out here: the rest of 3 source descriptions. The JSON record has them.