Name | CVE-2021-3838 |
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. |
Source | CVE (at NVD; CERT, LWN, oss-sec, fulldisc, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more) |
References | DLA-3495-1, DLA-3495-2 |
Vulnerable and fixed packages
The table below lists information on source packages.
Source Package | Release | Version | Status |
---|
php-dompdf (PTS) | jessie | 0.6.1+dfsg-2+deb8u1 | vulnerable |
| stretch | 0.6.2+dfsg-3 | vulnerable |
| buster (security), buster, buster (lts) | 0.6.2+dfsg-3+deb10u2 | fixed |
| bullseye | 0.6.2+dfsg-3.1 | vulnerable |
| bookworm | 2.0.3+dfsg-1 | fixed |
| sid, trixie | 3.0.0+dfsg-2 | fixed |
The information below is based on the following data on fixed versions.
Notes
[bullseye] - php-dompdf <no-dsa> (Minor issue)
https://github.com/dompdf/dompdf/issues/2564
https://huntr.dev/bounties/0bdddc12-ff67-4815-ab9f-6011a974f48e
https://github.com/dompdf/dompdf/commit/99aeec1efec9213e87098d42eb09439e7ee0bb6a (v2.0.0)