Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-23907: CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in Apache Software Foundation Apache PDFBox Examples

0
Unknown
VulnerabilityCVE-2026-23907cvecve-2026-23907cwe-22
Published: Tue Mar 10 2026 (03/10/2026, 09:43:40 UTC)
Source: CVE Database V5
Vendor/Project: Apache Software Foundation
Product: Apache PDFBox Examples

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.

AI-Powered Analysis

AILast updated: 03/10/2026, 14:04:09 UTC

Technical Analysis

CVE-2026-23907 is a path traversal vulnerability classified under CWE-22 found in the ExtractEmbeddedFiles example of the Apache PDFBox library, specifically in versions 2.0.24 through 2.0.36 and 3.0.0 through 3.0.7. The vulnerability occurs because the example code appends the filename retrieved from PDComplexFileSpecification.getFilename() directly to the extraction path without sanitization or validation. This allows an attacker to craft malicious PDF files containing embedded files with filenames that include directory traversal sequences (e.g., '../'), enabling extraction of files outside the intended directory. Such behavior can lead to arbitrary file writes on the host system, potentially overwriting critical files or placing malicious payloads in sensitive locations. The vulnerability is limited to users who have copied the example code into their production environments without implementing proper path validation. The Apache PDFBox team has addressed this by modifying the example to convert both the initial extraction path and the target extraction path to canonical forms and verifying that the extraction path is contained within the initial directory, preventing traversal. Documentation has also been updated to warn users. No CVSS score has been assigned, and no known exploits have been reported in the wild. The vulnerability requires an attacker to supply a crafted PDF file and for the vulnerable extraction code to be used in a context where such files are processed, which limits the attack surface. However, the risk remains significant for organizations that use the example code as-is in production.

Potential Impact

The primary impact of this vulnerability is the potential for arbitrary file write outside the intended extraction directory, which can lead to several security issues. An attacker could overwrite critical system or application files, potentially leading to denial of service, privilege escalation, or remote code execution if the overwritten files are executable or configuration files. The confidentiality and integrity of the system could be compromised if sensitive files are replaced or malicious files are planted. Since the vulnerability exists in example code, the impact depends heavily on whether organizations have incorporated this example into their production workflows without additional safeguards. If exploited, this could affect any system processing untrusted PDF files with embedded content using the vulnerable code, including document management systems, automated processing pipelines, or web applications. The lack of known exploits suggests limited current active exploitation, but the ease of exploitation through crafted PDFs and the widespread use of Apache PDFBox in Java applications worldwide means the threat should not be underestimated. The vulnerability could disrupt business operations and damage organizational reputation if exploited.

Mitigation Recommendations

Organizations should immediately review their use of Apache PDFBox, particularly any custom code derived from the ExtractEmbeddedFiles example. They should ensure that extraction paths are properly sanitized and validated by converting paths to their canonical forms and verifying that the extraction path is contained within the intended directory, as recommended by the Apache PDFBox project. Avoid using example code directly in production without security review. Upgrade to Apache PDFBox versions later than 2.0.36 or 3.0.7 where the example has been corrected. Implement strict input validation and sandboxing when processing untrusted PDF files, including limiting file system permissions of the extraction process to prevent unauthorized file writes. Monitor logs for suspicious file extraction activities and consider employing runtime application self-protection (RASP) or endpoint detection to detect anomalous file system operations. Educate developers on secure coding practices to prevent path traversal vulnerabilities. If upgrading is not immediately possible, apply manual patches to the extraction logic to enforce path validation. Finally, restrict the acceptance of PDF files from untrusted sources or implement additional scanning before processing.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
apache
Date Reserved
2026-01-19T12:13:50.503Z
Cvss Version
null
State
PUBLISHED

Threat ID: 69b0215bea502d3aa8591625

Added to database: 3/10/2026, 1:49:15 PM

Last enriched: 3/10/2026, 2:04:09 PM

Last updated: 3/10/2026, 4:49:30 PM

Views: 9

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses