What’s Vulnerable › Vulnerabilities

CVE-2021-3838: PHAR Deserialization in dompdf/dompdf

Description

DomPDF before version 2.0.0 is vulnerable to PHAR deserialization due to a lack of checking on the protocol before passing it into the file_get_contents() function. An attacker who can upload files of any type to the server can pass in the phar:// protocol to unserialize the uploaded file and instantiate arbitrary PHP objects. This can lead to remote code execution, especially when DOMPdf is used with frameworks with documented POP chains like Laravel or vulnerable developer code.

Affected products

How to fix

Upgrade to a fixed version: dompdf 2.0.0; Packagist Dompdf/Dompdf 2.0.0. Check the vendor advisory for mitigations.

References

Get alerted when CVE-2021-3838 or the next vulnerability affects your stack