CVE-2021-3838

NameCVE-2021-3838
DescriptionDomPDF 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.
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)
ReferencesDLA-3495-1, DLA-3495-2

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
php-dompdf (PTS)bullseye0.6.2+dfsg-3.1vulnerable
bookworm2.0.3+dfsg-1fixed
sid, trixie3.0.0+dfsg-2fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
php-dompdfsourcebuster0.6.2+dfsg-3+deb10u2DLA-3495-2
php-dompdfsource(unstable)2.0.2+dfsg-1

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)

Search for package or bug name: Reporting problems