Skip to content

Commit fe9fa1a

Browse files
Merge pull request #896 from kevinbackhouse/poppler-CVE-2025-52886
PoC for poppler CVE-2025-52886
2 parents 105618f + 7a9c6b0 commit fe9fa1a

File tree

6 files changed

+875
-0
lines changed

6 files changed

+875
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pdfgen
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
pdfgen: pdfgen.cpp utils.cpp utils.h
2+
g++ -Wall -Wextra -g -O0 pdfgen.cpp utils.cpp -lz -o pdfgen
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Proof of concept for poppler CVE-2025-52886
2+
3+
CVE-2025-52886 is a use-after-free vulnerability in
4+
[poppler](https://gitlab.freedesktop.org/poppler), caused by a
5+
reference count overflow. Reference counting was done with a 32-bit
6+
counter, which meant it was feasible to overflow the counter. In my
7+
testing, it took approximately 12 hours to overflow the counter
8+
though, so the risk of exploitation was low.
9+
10+
This directory contains the code for building the proof-of-concept. To
11+
run it:
12+
13+
```bash
14+
make
15+
./pdfgen > poc.pdf
16+
```
17+
18+
Notice that the size of the generated PDF is only 3104 bytes. Now try
19+
to either open the PDF or run a command line application like
20+
`pdftohtml` on it.
21+
22+
## Links:
23+
24+
* https://gitlab.freedesktop.org/poppler/poppler/-/issues/1581
25+
* https://securitylab.github.com/advisories/GHSL-2025-054_poppler/

0 commit comments

Comments
 (0)