Vulnerabilities in pkg:maven/org.apache.pdfbox/pdfbox-examples

PACKAGE
Advisory Identifier: GHSA-gcj8-76p4-g2fq
Advisory Summary

CVE-2026-33929 is a MODERATE (CVSS 4.3) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Apache PDFBox Examples libraries in the Maven ecosystem. The issue involves path traversal in pdfbox extractembeddedfiles example code. Remediation is available by upgrading affected packages to version 2.0.37, 3.0.8.

2 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/org.apache.pdfbox/pdfbox-examples

2 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/org.apache.pdfbox/pdfbox-examples. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-gcj8-76p4-g2fq CVE-2026-33929 MODERATE Apache PDFBox Examples: Path Traversal in PDFBox ExtractEmbeddedFiles Example Code
GHSA-jjwr-xmw6-gf78 CVE-2026-23907 MODERATE Apache PDFBox has Path Traversal through PDComplexFileSpecification.getFilename() function

CVE-2026-33929 at a Glance

CVE Identifier CVE-2026-33929
GHSA Identifier GHSA-gcj8-76p4-g2fq
Severity MODERATE
CVSS v3.1 Base Score 4.3
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Apache PDFBox Examples
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 4.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2026-33929

To remediate this vulnerability, upgrade all affected Apache PDFBox Examples dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.apache.pdfbox:pdfbox-examples fixed: 2.0.37
<dependency>
    <groupId>org.apache.pdfbox</groupId>
    <artifactId>pdfbox-examples</artifactId>
    <version>2.0.37</version>
</dependency>
org.apache.pdfbox:pdfbox-examples fixed: 3.0.8
<dependency>
    <groupId>org.apache.pdfbox</groupId>
    <artifactId>pdfbox-examples</artifactId>
    <version>3.0.8</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.apache.pdfbox

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2026-33929, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.apache.pdfbox

Analyze the terminal output to locate any version of Apache PDFBox Examples in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.37), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.apache.pdfbox command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Apache PDFBox Examples, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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.

CVE-2026-33929 Affected Apache PDFBox Examples Versions

2 component(s)
Fixed Versions:
2.0.373.0.8
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.pdfbox:pdfbox-examples
Maven
≥ 2.0.24
< 2.0.37
2.0.37
org.apache.pdfbox:pdfbox-examples
Maven
≥ 3.0.0
< 3.0.8
3.0.8

References

Frequently Asked Questions

What is CVE-2026-33929?
CVE-2026-33929 is a security vulnerability in Apache PDFBox Examples involving Path Traversal in PDFBox ExtractEmbeddedFiles Example Code under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Apache PDFBox Examples versions are affected?
Affected versions include releases prior to 2.0.37, 3.0.8 across affected packages: org.apache.pdfbox:pdfbox-examples.
What version fixes CVE-2026-33929?
Upgrading to 2.0.37, 3.0.8 (or the latest patched release for your respective branch) resolves the vulnerability.
Is pdfbox-examples affected?
Yes, org.apache.pdfbox:pdfbox-examples is affected in releases prior to 2.0.37, 3.0.8. Upgrade your dependency to 2.0.37, 3.0.8 or later.
What is the CVSS score of CVE-2026-33929?
CVE-2026-33929 has a CVSS v3.1 base score of 4.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2026-33929?
CVE-2026-33929 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check Maven dependencies for CVE-2026-33929?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.pdfbox'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-gcj8-76p4-g2fq",
  "modified" : "2026-04-14T23:42:00Z",
  "published" : "2026-04-14T09:30:45Z",
  "aliases" : [ "CVE-2026-33929" ],
  "summary" : "Apache PDFBox Examples: Path Traversal in PDFBox ExtractEmbeddedFiles Example Code",
  "details" : "Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability in Apache PDFBox Examples.\n\nThis issue affects the \nExtractEmbeddedFiles example in Apache PDFBox: from 2.0.24 through 2.0.36, from 3.0.0 through 3.0.7.\n\n\nUsers 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.\n\nThe 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\".\n\nUsers who have copied this example into their production code should apply the mentioned change. The example \nhas been changed accordingly and is available in the project repository.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.pdfbox:pdfbox-examples"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.24"
      }, {
        "fixed" : "2.0.37"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.0.36"
    }
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.pdfbox:pdfbox-examples"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.0.8"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 3.0.7"
    }
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-33929"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/pdfbox/pull/427/changes"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apache/pdfbox"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread/j8l07tgzy9dm8d8n0f3c45h7zg7t3ld6"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread/op3lyx1ngzy4qycn06l6hljyf28ff0zs"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-14T23:42:00Z",
    "nvd_published_at" : "2026-04-14T09:16:36Z"
  }
}