← Vulnerability feed

Vulnerability record · CVE-2021-3838 · published 15 November 2024

CVE-2021-3838: Dompdf project dompdf deserialization of untrusted data vulnerability

Dompdf Project · Dompdf

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.

9.8 CVSS 3.1 Critical EPSS 1.4% · top 28.0% CWE-502 · Deserialization of untrusted data
9.8CVSS 3.1 base score
1.4%EPSS exploitation probability, 30 days
NoNot in CISA KEV
1Affected product versions listed by NVD
2References, 1 tagged exploit
17 Jun 2026Last modified by NVD

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.

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

Affected products

1 vulnerable configurations from NVD's CPE data, grouped by vendor and product.

References

Track CVE-2021-3838 inside VULONE

Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.

Start free Open in platform

Related vulnerabilities

Same products first, then exploited flaws of the same weakness class.

9.8CVE-2021-3902Dompdf project dompdf xml external entity (xxe) vulnerabilityAn improper restriction of external entities (XXE) vulnerability in dompdf/dompdf's SVG parser allows for Server-Side Request Forgery (SSRF) and dese…EPSS 0.95%9.8CVE-2023-24813Dompdf project dompdf interpretation conflict vulnerabilityDompdf is an HTML to PDF converter written in php. Due to the difference in the attribute parser of Dompdf and php-svg-lib, an attacker can still cal…EPSS 2.5%9.8CVE-2023-23924Dompdf project dompdf incorrect authorization vulnerabilityDompdf is an HTML to PDF converter. The URI validation on dompdf 2.0.1 can be bypassed on SVG parsing by passing `<image>` tags with uppercase letter…EPSS 3.6%9.8CVE-2022-28368Dompdf remote code execution via CSS @font-face src:urlDompdf 1.2.1 permits remote code execution when an HTML input containing an @font-face CSS rule with a .php file in the src:url field is processed. B…EPSS 82%analysed8.8CVE-2014-5013Dompdf project dompdf vulnerabilityDOMPDF before 0.6.2 allows remote code execution, a related issue to CVE-2014-2383.EPSS 4.5%7.5CVE-2023-50262Dompdf project dompdf improper input validation vulnerabilityDompdf is an HTML to PDF converter for PHP. When parsing SVG images Dompdf performs an initial validation to ensure that paths within the SVG are all…EPSS 1.5%7.5CVE-2022-41343Dompdf project dompdf vulnerabilityregisterFont in FontMetrics.php in Dompdf before 2.0.1 allows remote file inclusion because a URI validation failure does not halt font registration,…EPSS 6.0%6.5CVE-2014-5011Dompdf project dompdf information exposure vulnerabilityDOMPDF before 0.6.2 allows Information Disclosure.EPSS 1.5%

Source: NIST National Vulnerability Database (record CVE-2021-3838), CISA KEV, FIRST EPSS (scores of 2026-09-28). This page is refreshed as NVD updates the record.