XML External Entity (XXE) Vulnerability in libpdfbox-java: Apache PDFBox Versions Prior to 1.8.12 and 2.0.1

libpdfbox-java Updated 02 Oct 2025

Summary

01/06/2016
N/A
Yes i
High
7.8

CVE-2016-2175: Apache PDFBox before 1.8.12 and 2.x before 2.0.1 does not properly initialize the XML parsers, which allows context-dependent attackers to conduct XML External Entity (XXE) attacks via a crafted PDF. Affects libpdfbox-java versions < 1:1.8.12-1. Fixed in 1:1.8.12-1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

libpdfbox-java is a Java library used for creating and manipulating PDF documents. It provides functionalities such as text extraction, PDF rendering, and document generation. The library is widely utilized in various applications for its ease of use and robust features. However, certain versions of libpdfbox-java are vulnerable to XML External Entity (XXE) attacks due to improper initialization of XML parsers, which can lead to severe security risks.

Vulnerability Detail

The vulnerability, identified as CVE-2016-2175, arises from the failure of Apache PDFBox versions before 1.8.12 and 2.x before 2.0.1 to properly initialize XML parsers. This oversight allows context-dependent attackers to exploit the vulnerability by crafting malicious PDF files that can trigger XXE attacks. Such attacks can lead to unauthorized access to sensitive data, denial of service, and other malicious activities, making it critical for users to address this issue promptly.

How To Fix

Minimum fixed version

1:1.8.12-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade libpdfbox-java

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If immediate upgrading is not feasible, a temporary workaround is to disable XML parsing features in the application using libpdfbox-java. However, this is not a long-term solution and should only be used until the library can be updated.

Conclusion

CVE-2016-2175 represents a significant security risk for applications utilizing vulnerable versions of libpdfbox-java. It is crucial for users to upgrade to the recommended versions to mitigate the risk of XML External Entity attacks. Regular monitoring and updates are essential to maintain application security.

See every vulnerability recorded for libpdfbox-java →

Share this vulnerability

FAQ

CVE-2016-2175 is a vulnerability in Apache PDFBox that allows for XML External Entity (XXE) attacks due to improper initialization of XML parsers.

Versions of libpdfbox-java prior to 1.8.12 and 2.0.1 are affected by this vulnerability.

The vulnerability can lead to unauthorized access to sensitive data, denial of service, and other malicious activities.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

The CVSS score for CVE-2016-2175 is 7.8, indicating a high severity level.

Related vulnerabilities

Recent vulnerabilities recorded for libpdfbox-java.

How To Fix

Minimum fixed version

1:1.8.12-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade libpdfbox-java

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback