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

Medium 5.3 Published Updated

Path traversal in Apache PDFBox example code allows attackers to write files outside the intended directory if the example is used in production.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-23907?

CVE-2026-23907 is a medium-severity path traversal vulnerability in Apache PDFBox Examples, published on 10 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

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

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.

Weakness: CWE-22

Which versions are affected by CVE-2026-23907?

2 open source packages ship an affected version, including org.apache.pdfbox:pdfbox-examples. It affects 1 product.

PackageAffectedFixed in
org.apache.pdfbox:pdfbox-examples MavenFrom 2.0.243.0.7
org.apache.pdfbox:pdfbox-examples MavenFrom 2.0.243.0.7

Products include Apache Pdfbox-Examples.

How do I fix CVE-2026-23907?

Upgrade org.apache.pdfbox:pdfbox-examples to 3.0.7 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2026-23907 being exploited?

There is no known exploitation of CVE-2026-23907 in the wild and no public exploit code.

Public exploit code: 1 proofs of concept on GitHub.

Sources

Also known as DEBIAN-CVE-2026-23907, GHSA-jjwr-xmw6-gf78, UBUNTU-CVE-2026-23907.

Is CVE-2026-23907 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free