XML External Entity (XXE) Vulnerability in libpdfbox-java: Apache PDFBox Versions Prior to 1.8.12 and 2.0.1
Summary
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 ↓
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.
No signup required · Results in about 60 seconds
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 →
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.