Pdfminer pdfminer.six
pdfminer.six vulnerable to Arbitrary Code Execution via Crafted PDF Input
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.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 20251107
Fixed in 20251107
Mitigation
Upgrade pdfminer.six to 20251107 or later.
References
- Vendor advisory github.com/pdfminer/pdfminer.six/security/advi…
- Patch github.com/pdfminer/pdfminer.six/commit/b808ee…
- Release notes github.com/pdfminer/pdfminer.six/releases/tag/…
Timeline
Days relative to CVE publicationFirst public PoC 31 days after publication; not in CISA KEV. First PoC: luigigubello/CVE-2025-64512-Polyglot-PoC (created 11 Dec 2025, found by us: backfilled).
PoC repositories
Found on GitHub.10 PoCs · 1 suspicious or fake
PoCs 10
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| luigigubello/CVE-2025-64512-Polyglot-PoC | 11 Dec 2025 +31 d | 8 | PoC |
| matesz44/CVE-2025-64512 | 19 Jul 2026 +251 d | 4 | PoC |
| BardLaudian/CVE-2025-64512 | 21 Jul 2026 +252 d | 1 | PoC |
| MehdiChyhab/CVE-2025-64512-exploit | 21 Jul 2026 +253 d | 0 | PoC |
| stoic-crawler/CVE-2025-64512 | 22 Jul 2026 +254 d | 0 | PoC |
| saadhassan77/CVE-2025-64512---pdfminer.six-Remote-Code-Execution-RCE- | 27 Jul 2026 +259 d | 0 | PoC |
| DodgeNefoli/CVE-2025-64512 | 12 Aug 2026 +274 d | 0 | PoC |
| oguzylmzx/CVE-2025-64512-pdfminer-PoC | 15 Aug 2026 +278 d | 0 | PoC |
| Jinook-Kim/CVE-2025-64512_PoC | 15 Sep 2026 +308 d | 0 | PoC |
| SASbot01/HTB-Bedside | 1 Oct 2026 +325 d | 0 | PoC |
Suspicious or fake 1
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| joeack123/PoC-for-CVE-2025-64512 | 19 Jul 2026 +251 d | 0 | Fake |
Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.
PoC characteristics
What to hunt for in your logs · from 10 PoC reposPOST /
- Body markers
uploadFile=@name="uploadFile"uploadFile=@/tmp/test.pdfuploadFile=@test_archive.zip;filename=collection.zip;type=application/zipuploadFile=@/tmp/payload.php;filename=$f;type=$ctinmultipart/form-data- Ports
- 8000
- Seen in
- 2 repos: DodgeNefoli/CVE-2025-64512, SASbot01/HTB-Bedside
- Evidence
- DodgeNefoli/CVE-2025-64512/cve_2025_64512.py:154 SASbot01/HTB-Bedside/exploit/poc/exploit.py:95 SASbot01/HTB-Bedside/exploit/poc/exploit_bedside.py:46 SASbot01/HTB-Bedside/exploit/poc/exploit_bedside.py:60 SASbot01/HTB-Bedside/exploit/poc/exploit_fixed.py:25 SASbot01/HTB-Bedside/exploit/poc/exploit_fixed.py:37
GET /$p)
- Ports
- 8000
- Seen in
- 1 repo: SASbot01/HTB-Bedside
- Evidence
- SASbot01/HTB-Bedside/phases/phase-03-vhost-research.md:52
GET /../../../../../../..{var}
- Ports
- 8000
- Seen in
- 1 repo: SASbot01/HTB-Bedside
- Evidence
- SASbot01/HTB-Bedside/scripts/read-host-file.sh:23
GET /../../../../etc/passwd
- Ports
- 3000
- Seen in
- 1 repo: SASbot01/HTB-Bedside
- Evidence
- SASbot01/HTB-Bedside/phases/phase-07-host-file-read.md:23
GET /../../../../home/developer/.ssh/authorized_keys
- Ports
- 3000
- Seen in
- 1 repo: SASbot01/HTB-Bedside
- Evidence
- SASbot01/HTB-Bedside/phases/phase-07-host-file-read.md:68
GET /../../../../home/developer/.ssh/id_ed25519
- Ports
- 3000
- Seen in
- 1 repo: SASbot01/HTB-Bedside
- Evidence
- SASbot01/HTB-Bedside/phases/phase-07-host-file-read.md:66
GET /../../../../home/developer/.ssh/id_rsa
- Ports
- 3000
- Seen in
- 1 repo: SASbot01/HTB-Bedside
- Evidence
- SASbot01/HTB-Bedside/phases/phase-07-host-file-read.md:65
GET /api/slice
- Query
file=../../../../etc/passwd- Ports
- 3000
- Seen in
- 1 repo: SASbot01/HTB-Bedside
- Evidence
- SASbot01/HTB-Bedside/phases/phase-07-host-file-read.md:12
GET /uploads/test.pdf
- Ports
- 8000
- Seen in
- 1 repo: SASbot01/HTB-Bedside
- Evidence
- SASbot01/HTB-Bedside/phases/phase-04-upload-analysis.md:22
GET /uploads/{var}
- Seen in
- 1 repo: DodgeNefoli/CVE-2025-64512
- Evidence
- DodgeNefoli/CVE-2025-64512/cve_2025_64512.py:79
POST /uploads/{var}
- Body markers
name="field"inmultipart/form-data- Seen in
- 1 repo: DodgeNefoli/CVE-2025-64512
- Evidence
- DodgeNefoli/CVE-2025-64512/cve_2025_64512.py:69
Regex
Generated from PoC characteristics; not yet reviewed. Matches the request path and query.
(?i)^/(?:[?#].*)?$
(?i)^/\$p\)(?:[?#].*)?$
(?i)^/\.\./\.\./\.\./\.\./\.\./\.\./\.\.[^/?#]*(?:[?#].*)?$
(?i)^/\.\./\.\./\.\./\.\./etc/passwd(?:[?#].*)?$
(?i)^/\.\./\.\./\.\./\.\./home/developer/\.ssh/authorized_keys(?:[?#].*)?$
Suricata
Template generated from PoC characteristics. Review before deploying.
alert http any any -> $HOME_NET [8000] (msg:"GG PoC-Monitor CVE-2025-64512 pdfminer pdfminer.six exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.request_body; content:"uploadFile=@"; http.request_body; content:"name=|22|uploadFile|22|"; http.request_body; content:"uploadFile=@/tmp/test.pdf"; http.request_body; content:"uploadFile=@test_archive.zip|3b|filename=collection.zip|3b|type=application/zip"; http.request_body; content:"uploadFile=@/tmp/payload.php|3b|filename=$f|3b|type=$ct"; reference:url,poc.griffinguard.io/cve/CVE-2025-64512; classtype:web-application-attack; sid:9403561; rev:1;)
alert http any any -> $HOME_NET [8000] (msg:"GG PoC-Monitor CVE-2025-64512 pdfminer pdfminer.six exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/$p)"; reference:url,poc.griffinguard.io/cve/CVE-2025-64512; classtype:web-application-attack; sid:9411598; rev:1;)
alert http any any -> $HOME_NET [8000] (msg:"GG PoC-Monitor CVE-2025-64512 pdfminer pdfminer.six exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/../../../../../../.."; reference:url,poc.griffinguard.io/cve/CVE-2025-64512; classtype:web-application-attack; sid:9074038; rev:1;)
alert http any any -> $HOME_NET [3000] (msg:"GG PoC-Monitor CVE-2025-64512 pdfminer pdfminer.six exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/../../../../etc/passwd"; reference:url,poc.griffinguard.io/cve/CVE-2025-64512; classtype:web-application-attack; sid:9845582; rev:1;)
alert http any any -> $HOME_NET [3000] (msg:"GG PoC-Monitor CVE-2025-64512 pdfminer pdfminer.six exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/../../../../home/developer/.ssh/authorized_keys"; reference:url,poc.griffinguard.io/cve/CVE-2025-64512; classtype:web-application-attack; sid:9465567; rev:1;)
Sigma
Template generated from PoC characteristics. Review before deploying.
title: pdfminer pdfminer.six exploit attempt (CVE-2025-64512)
id: gg-pocmon-cve-2025-64512-9403561
status: experimental
description: Request pattern taken from public PoCs for CVE-2025-64512. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2025-64512
logsource:
category: webserver
detection:
selection:
cs-method: POST
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2025.64512
title: pdfminer pdfminer.six exploit attempt (CVE-2025-64512)
id: gg-pocmon-cve-2025-64512-9411598
status: experimental
description: Request pattern taken from public PoCs for CVE-2025-64512. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2025-64512
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/$p)'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2025.64512
title: pdfminer pdfminer.six exploit attempt (CVE-2025-64512)
id: gg-pocmon-cve-2025-64512-9074038
status: experimental
description: Request pattern taken from public PoCs for CVE-2025-64512. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2025-64512
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/../../../../../../..'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2025.64512
title: pdfminer pdfminer.six exploit attempt (CVE-2025-64512)
id: gg-pocmon-cve-2025-64512-9845582
status: experimental
description: Request pattern taken from public PoCs for CVE-2025-64512. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2025-64512
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/../../../../etc/passwd'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2025.64512
title: pdfminer pdfminer.six exploit attempt (CVE-2025-64512)
id: gg-pocmon-cve-2025-64512-9465567
status: experimental
description: Request pattern taken from public PoCs for CVE-2025-64512. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2025-64512
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/../../../../home/developer/.ssh/authorized_keys'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2025.64512