CVE-2026-23907

Apache PDFBox Examples: Path Traversal in PDFBox ExtractEmbeddedFiles Example Code

Published Mar 10, 2026 CVSS 3.1 · 5.3 Medium EPSS < 1% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-jjwr-xmw6-gf78 Apache PDFBox has Path Traversal through PDComplexFileSpecification.getFilename() function
History
Type Values Removed Values Added
First Time appeared Apache pdfbox-examples
CPEs cpe:2.3:a:apache:pdfbox:*:*:*:*:*:*:*:* cpe:2.3:a:apache:pdfbox-examples:*:*:*:*:*:*:*:*
Vendors & Products Apache pdfbox
Apache pdfbox-examples
Type Values Removed Values Added
First Time appeared Apache pdfbox
CPEs cpe:2.3:a:apache:pdfbox:*:*:*:*:*:*:*:*
Vendors & Products Apache pdfbox
Type Values Removed Values Added
First Time appeared Apache
Apache pdfbox Examples
Vendors & Products Apache
Apache pdfbox Examples
Type Values Removed Values Added
Metrics cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N'}

ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
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. 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.
Type Values Removed Values Added
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.
Title Apache PDFBox Examples: Path Traversal in PDFBox ExtractEmbeddedFiles Example Code
Weaknesses CWE-22
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
apache
Published
Updated
Mar 10, 2026, 5:51 PM
Reserved
Jan 19, 2026, 12:13 PM
Status
Analyzed
Published
Mar 10, 2026, 6:18 PM
Modified
Sep 17, 2026, 5:22 PM
Severity
Moderate
Public date
Mar 10, 2026, 9:43 AM