Back

MEDIUM

Apache PDFBox Examples: Path Traversal in PDFBox ExtractEmbeddedFiles Example Code

Published Mar 10, 2026

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.

Affected products

Remediation

Red Hat statement

Red Hat Product Security rates this issue as Moderate severity, because the vulnerable code exists in the example implementation shipped with Apache PDFBox and is not part of the core library functionality. Applications that copied or reused the ExtractEmbeddedFiles example code without adding proper path validation may allow path traversal during extraction of embedded files from PDF documents. The impact is limited to the permissions of the application processing the PDF. Systems that do not use this example code or that properly sanitize extraction paths are not affected.

Red Hat mitigation

Red Hat is not aware of a practical temporary workaround that fully mitigates this issue or meets Red Hat Product Security's standards for usability, deployment, applicability, or stability. Customers are advised to apply the relevant security updates if they become available.

Weaknesses (1)

References (9)

Change history (0)

No recorded changes yet.

Sources
CVE.org / MITRE
Status PUBLISHED
Assigner apache
Published Mar 10, 2026
Updated Mar 10, 2026
Reserved Jan 19, 2026
CISA Vulnrichment
Updated Mar 10, 2026
NVD
Status Analyzed
Modified Sep 17, 2026
Red Hat
Severity Moderate
Public date Mar 10, 2026
GHSA-JJWR-XMW6-GF78