CVE-2021-3838
CVE-2021-3838 is a critical-severity vulnerability in Dompdf Project Dompdf with a CVSS 3.x base score of 9.8. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-502.
Key facts
- Severity: Critical (CVSS 3.x base score 9.8)
- EPSS exploit prediction: 1% (70th percentile)
- Actively exploited: Not listed in CISA KEV
- EU (EUVD) id: EUVD-2024-3197
- Weakness: CWE-502
- Affected product: Dompdf Project Dompdf
- Published:
- Last modified:
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.
Frequently asked questions
- What is CVE-2021-3838?
- 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.
- How severe is CVE-2021-3838?
- CVE-2021-3838 has a CVSS 3.x base score of 9.8, rated critical severity. It is exploitable over network with low attack complexity, requires no privileges and no user interaction. Impact on confidentiality is high, integrity high, and availability high.
- Is CVE-2021-3838 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 1% (70th percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2021-3838?
- CVE-2021-3838 affects Dompdf Project Dompdf. See the affected-products list for the exact vulnerable versions.
- How do I fix CVE-2021-3838?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Given its critical severity, prioritise patching exposed systems.
- Does CVE-2021-3838 have an EU (EUVD) identifier?
- Yes. CVE-2021-3838 is tracked in the ENISA EU Vulnerability Database (EUVD) as EUVD-2024-3197.
- When was CVE-2021-3838 published?
- CVE-2021-3838 was published on 2024-11-15 and last updated on 2026-06-17.
References
- https://github.com/dompdf/dompdf/commit/99aeec1efec9213e87098d42eb09439e7ee0bb6a
- https://huntr.com/bounties/0bdddc12-ff67-4815-ab9f-6011a974f48e
Affected products (1)
- cpe:2.3:a:dompdf_project:dompdf:*:*:*:*:*:*:*:*
More vulnerabilities in Dompdf Project Dompdf
- CVE-2023-24813 — Critical (CVSS 10.0): Dompdf is an HTML to PDF converter written in php. Due to the difference in the attribute parser of Dompdf and…
- CVE-2023-23924 — Critical (CVSS 10.0): Dompdf is an HTML to PDF converter. The URI validation on dompdf 2.0.1 can be bypassed on SVG parsing by passing…
- CVE-2021-3902 — Critical (CVSS 9.8): An improper restriction of external entities (XXE) vulnerability in dompdf/dompdf's SVG parser allows for Server-Side…
- CVE-2022-28368 — Critical (CVSS 9.8): Dompdf 1.2.1 allows remote code execution via a .php file in the src:url field of an @font-face Cascading Style Sheets…
- CVE-2014-5013 — High (CVSS 8.8): DOMPDF before 0.6.2 allows remote code execution, a related issue to CVE-2014-2383.
- CVE-2022-41343 — High (CVSS 7.5): registerFont in FontMetrics.php in Dompdf before 2.0.1 allows remote file inclusion because a URI validation failure…
All CVEs affecting Dompdf Project Dompdf →
Other CWE-502 (Deserialization of Untrusted Data) vulnerabilities
- CVE-2026-41104 — Critical (CVSS 10.0): Deserialization of untrusted data in Microsoft Planetary Computer Pro allows an unauthorized attacker to disclose…
- CVE-2026-43633 — Critical (CVSS 10.0): HestiaCP versions 1.9.0 through 1.9.4 contain a deserialization vulnerability in the web terminal component caused by a…
- CVE-2026-33819 — Critical (CVSS 10.0): Deserialization of untrusted data in Microsoft Bing allows an unauthorized attacker to execute code over a network.
- CVE-2026-20131 — Critical (CVSS 10.0): A vulnerability in the web-based management interface of Cisco Secure Firewall Management Center (FMC) Software could…
- CVE-2026-25632 — Critical (CVSS 10.0): EPyT-Flow is a Python package designed for the easy generation of hydraulic and water quality scenario data of water…
- CVE-2025-14931 — Critical (CVSS 10.0): Hugging Face smolagents Remote Python Executor Deserialization of Untrusted Data Remote Code Execution Vulnerability.…
Browse all CWE-502 (Deserialization of Untrusted Data) vulnerabilities →