Skip to content
OpenAdvisories
Critical · 9.8 CVE-2021-3838 EUVD-2024-3197GHSA-577p-7j7h-2jgf

PHAR Deserialization in dompdf/dompdf

Published Nov 15, 2024 · Updated Nov 18, 2024 · Assigned by @huntr_ai

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

VendorProductAffectedFixed
dompdf dompdf/dompdf unspecified – < 2.0.0 2.0.0

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 12 php-dompdf 2.0.2+dfsg-1 —
Debian 11 php-dompdf 0.6.2+dfsg-3.1+deb11u1 DLA-4427-1
Debian 10 php-dompdf 0.6.2+dfsg-3+deb10u1 DLA-3495-2, DLA-3495-1
ReleasePackageFixed inAdvisory
Ubuntu 22.04 LTS php-dompdf 0.6.2+dfsg-3.1ubuntu0.1 USN-6277-2
Ubuntu 20.04 LTS php-dompdf 0.6.2+dfsg-3ubuntu0.20.04.1 USN-6277-1
Show 2 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 18.04 LTS php-dompdf 0.6.2+dfsg-3ubuntu0.18.04.1~esm1 USN-6277-1
Ubuntu Pro 16.04 LTS php-dompdf 0.6.1+dfsg-2ubuntu1+esm1 USN-6277-1

Affected packages

EcosystemPackageAffectedFixedRecord
Packagist dompdf/dompdf < 2.0.0 2.0.0 GHSA-577p-7j7h-2jgf

Advisories 5

References