CVE-2026-33929
Description
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability in Apache PDFBox Examples.
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.
Users are recommended to update to version 2.0.37 or 3.0.8 once available. Until then, they should apply the fix provided in GitHub PR 427.
The ExtractEmbeddedFiles example contained a path traversal vulnerability (CWE-22) mentioned in CVE-2026-23907. However the change in the releases 2.0.36 and 3.0.7 is flawed because it doesn't consider the file path separator. Because of that, a user having writing rights on /home/ABC could be victim to a malicious PDF resulting in a write attempt to any path starting with /home/ABC, e.g. "/home/ABCDEF".
Users who have copied this example into their production code should apply the mentioned change. The example has been changed accordingly and is available in the project repository.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A path traversal vulnerability in Apache PDFBox's ExtractEmbeddedFiles example allows writing files outside the intended directory.
Vulnerability
Analysis
CVE-2026-33929 is an improper pathname restriction (path traversal, CWE-22) vulnerability in the ExtractEmbeddedFiles example of Apache PDFBox. The issue affects versions 2.0.24 through 2.0.36 and 3.0.0 through 3.0.7. The vulnerability stems from a flawed fix for a previous path traversal bug (CVE-2026-23907) that was introduced in releases 2.0.36 and 3.0.7. The original fix did not properly account for file path separators, allowing an attacker to bypass the intended directory boundary check [1][3].
Exploitation
An attacker can craft a malicious PDF file containing embedded files with specially crafted filenames that include path traversal sequences. When a victim user runs the ExtractEmbeddedFiles example against this PDF, the code attempts to write the embedded file to a directory. Due to the incomplete check, the file can be written to any path that starts with the intended output directory (e.g., a user with write rights to /home/ABC could have files written to /home/ABCDEF). The attack requires the user to have write permissions on the base directory and to process the malicious PDF using the vulnerable example code [1][3].
Impact
A successful exploit allows an attacker to write arbitrary file content to a location outside the intended extraction directory, potentially overwriting sensitive files or placing malicious files in unexpected locations. The CVSS v3 base score is 4.3 (Medium), reflecting the need for user interaction and specific conditions for exploitation [1].
Mitigation
Apache recommends updating to versions 2.0.37 or 3.0.8 once they become available. Until then, users should apply the fix provided in GitHub PR #427, which improves the directory boundary check by requiring the canonical parent path to either equal the target directory or start with it followed by a file separator [1][3]. Users who have incorporated this example into their own production code should apply the same fix to prevent path traversal attacks.
AI Insight generated on May 18, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
org.apache.pdfbox:pdfbox-examplesMaven | >= 2.0.24, < 2.0.37 | 2.0.37 |
org.apache.pdfbox:pdfbox-examplesMaven | >= 3.0.0, < 3.0.8 | 3.0.8 |
Affected products
2Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
5- github.com/apache/pdfbox/pull/427/changesnvdPatchWEB
- github.com/advisories/GHSA-gcj8-76p4-g2fqghsaADVISORY
- lists.apache.org/thread/j8l07tgzy9dm8d8n0f3c45h7zg7t3ld6nvdMailing ListVendor AdvisoryWEB
- nvd.nist.gov/vuln/detail/CVE-2026-33929ghsaADVISORY
- lists.apache.org/thread/op3lyx1ngzy4qycn06l6hljyf28ff0zsnvdMailing ListWEB
News mentions
0No linked articles in our index yet.