oss-sec mailing list archives

CVE-2026-23907: Apache PDFBox Examples: Path Traversal in PDFBox ExtractEmbeddedFiles Example Code


From: Tilman Hausherr <tilman () apache org>
Date: Tue, 10 Mar 2026 09:20:37 +0000

Severity: moderate 

Affected versions:

- Apache PDFBox Examples (org.apache.pdfbox:pdfbox-examples) 2.0.24 through 2.0.36
- Apache PDFBox Examples (org.apache.pdfbox:pdfbox-examples) 3.0.0 through 3.0.7

Description:

This issue affects the 
ExtractEmbeddedFiles example in Apache PDFBox: from 2.0.24 through 2.0.36, from 3.0.0 through 3.0.7.


The ExtractEmbeddedFiles example contains a path traversal vulnerability (CWE-22) because 
the filename that is obtained from 
PDComplexFileSpecification.getFilename() is appended to the extraction path.

Users who have copied this example into their production code should 
review it to ensure that the extraction path is acceptable. The example 
has been changed accordingly, now the initial path and the extraction 
paths are converted into canonical paths and it is verified that 
extraction path contains the initial path. The documentation has also 
been adjusted.

Credit:

Joakim Bülow (Neo4j Security Team) (finder)

References:

https://github.com/JoakimBulow/
https://pdfbox.apache.org/
https://www.cve.org/CVERecord?id=CVE-2026-23907


Current thread: