Vulnerabilities / CVE-2021-3838

critical

CVE-2021-3838

DomPDF before version 2.0.0 is vulnerable to PHAR deserialization due ...

Published Modified CWE 502
In the Trivy database since at least 24 Oct 2026, 07:11 UTCWhen it arrived before that build is not recorded.

Severity by source

NVD9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
GHSA9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Trivy's own label is CRITICAL. Rated critical by NVD, GHSA. Rated lower by Ubuntu (medium).

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 packages and fixed versions

SourcePackageFixed in
composer::GitHub Security Advisory Composerdompdf/dompdf2.0.0
debian 10php-dompdf0.6.2+dfsg-3+deb10u2
debian 11php-dompdf0.6.2+dfsg-3.1+deb11u1
debian 12php-dompdf2.0.2+dfsg-1
echophp-dompdf2.0.2+dfsg-1
rapidfort ubuntu 20.04php-dompdf0:0.6.2+dfsg-3.1ubuntu0.1
rapidfort ubuntu 22.04php-dompdf0:0.6.2+dfsg-3.1ubuntu0.1
rapidfort ubuntu 24.04php-dompdf0:0.6.2+dfsg-3.1ubuntu0.1
ubuntu 16.04-ESMphp-dompdf0.6.1+dfsg-2ubuntu1+esm1
ubuntu 18.04-ESMphp-dompdf0.6.2+dfsg-3ubuntu0.18.04.1~esm1
ubuntu 20.04php-dompdf0.6.2+dfsg-3ubuntu0.20.04.1
ubuntu 20.04-ESMphp-dompdf0.6.2+dfsg-3ubuntu0.20.04.1
Show all 13 entries from 13 sources
SourcePackageFixed in
composer::GitHub Security Advisory Composerdompdf/dompdf2.0.0
debian 10php-dompdf0.6.2+dfsg-3+deb10u2
debian 11php-dompdf0.6.2+dfsg-3.1+deb11u1
debian 12php-dompdf2.0.2+dfsg-1
echophp-dompdf2.0.2+dfsg-1
rapidfort ubuntu 20.04php-dompdf0:0.6.2+dfsg-3.1ubuntu0.1
rapidfort ubuntu 22.04php-dompdf0:0.6.2+dfsg-3.1ubuntu0.1
rapidfort ubuntu 24.04php-dompdf0:0.6.2+dfsg-3.1ubuntu0.1
ubuntu 16.04-ESMphp-dompdf0.6.1+dfsg-2ubuntu1+esm1
ubuntu 18.04-ESMphp-dompdf0.6.2+dfsg-3ubuntu0.18.04.1~esm1
ubuntu 20.04php-dompdf0.6.2+dfsg-3ubuntu0.20.04.1
ubuntu 20.04-ESMphp-dompdf0.6.2+dfsg-3ubuntu0.20.04.1
ubuntu 22.04php-dompdf0.6.2+dfsg-3.1ubuntu0.1

References

All 9 references

Vulnerability data compiled from the Trivy vulnerability database (trivy-db, Aqua Security, Apache License 2.0), which aggregates third-party advisories. CVE records are published by The MITRE Corporation under the CVE Terms of Use; CVE is a trademark of MITRE. This product uses data from the NVD API but is not endorsed or certified by the NVD. Severity, titles and advisory data from the GitHub Advisory Database (CC BY 4.0), Red Hat security data (CC BY 4.0) and the other sources linked on each entry. Entries may be summarised or re-formatted; the linked original is the authoritative record.