Arbitrary File Read Vulnerability in php-dompdf
Summary
CVE-2014-2383: dompdf.php in dompdf before 0.6.1, when DOMPDF_ENABLE_PHP is enabled, allows context-dependent attackers to bypass chroot protections and read arbitrary files via a PHP protocol and wrappers in the input_file parameter,... Affects php-dompdf versions < 0.6.1+dfsg-2. Fixed in 0.6.1+dfsg-2. 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
php-dompdf is a PHP library that allows for the generation of PDF files from HTML content. It is commonly used in web applications to convert web pages into PDF documents. This vulnerability affects versions of php-dompdf before 0.6.1 when the DOMPDF_ENABLE_PHP configuration option is enabled.
Vulnerability Detail
The vulnerability, identified as CVE-2014-2383, allows context-dependent attackers to bypass chroot protections and read arbitrary files. This can be achieved by exploiting the input_file parameter in dompdf.php. Attackers can use PHP protocol and wrappers, such as php://filter/read=convert.base64-encode/resource, to manipulate the input_file parameter and gain unauthorized access to sensitive files on the server. This vulnerability poses a risk to the confidentiality of data stored on the server.
How To Fix
Minimum fixed version
0.6.1+dfsg-2
This is the first release that contains the fix.
sudo apt-get install --only-upgrade php-dompdf
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a workaround, users can disable the DOMPDF_ENABLE_PHP configuration option if it is not required for their application. This can be done by modifying the configuration file or the code that initializes php-dompdf. Disabling this option will prevent the vulnerability from being exploited.
Conclusion
The arbitrary file read vulnerability in php-dompdf can be mitigated by updating to version 0.6.1 or later. Disabling the DOMPDF_ENABLE_PHP configuration option can also serve as a temporary workaround. For further assistance in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for php-dompdf →
FAQ
php-dompdf is a PHP library used for generating PDF files from HTML content. It is commonly used in web applications to convert web pages into PDF documents.
This vulnerability allows attackers to read arbitrary files on the server, bypassing chroot protections. It can lead to unauthorized access to sensitive data stored on the server.
To fix this vulnerability, update php-dompdf to version 0.6.1 or later. The fix was implemented in version 0.6.1+dfsg-2.
Yes, as a workaround, you can disable the DOMPDF_ENABLE_PHP configuration option if it is not required for your application. This will prevent the vulnerability from being exploited.
There are known exploits for this vulnerability that allow attackers to read arbitrary files on the server. It is important to update php-dompdf to the fixed version to prevent exploitation.
Related vulnerabilities
Recent vulnerabilities recorded for php-dompdf.