---
title: "CVE-2021-3838: Deserialization of Untrusted Data in dompdf/dompdf"
url: https://erroneo.us/security/cve/CVE-2021-3838/
description: "CVE-2021-3838 (dompdf/dompdf (Composer (PHP))): DomPDF before version 2.0.0 is vulnerable to PHAR deserialization due to a lack of checking on the protocol…"
type: vulnerability-record
section: "Security Digest"
date_published: 2024-11-15
date_modified: 2024-11-18
publisher: erroneo.us
author: erroneo.us Security Desk
cve: "CVE-2021-3838"
kev: false
cvss: 9.8
epss: 0.01432
license: All rights reserved. Quote with attribution and a link.
---

# CVE-2021-3838: Deserialization of Untrusted Data in dompdf/dompdf

**Signal:** Critical and remotely reachable. No known exploitation yet, but it is network-reachable without credentials. (Computed from CISA KEV, EPSS and CVSS; not an editorial verdict.)

## Should you act?

- Not in CISA KEV , but CISA’s SSVC assessment records a public proof-of-concept, so attack code exists.
- EPSS 1.4% , percentile 73: FIRST’s model estimates a 1.4% chance of exploitation activity in the next 30 days, higher than 73% of all scored CVEs (moderate). EPSS is a probability, not a verdict.
- Remotely reachable with no login and no user interaction. If the vulnerable service is exposed to the internet, prioritize it.
- Only applies if your dependency tree includes dompdf/dompdf (Composer (PHP)) < 2.0.0, fixed in 2.0.0 . Check your lockfile, including transitive dependencies.

## What it is

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 filegetcontents() 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

- Composer (PHP) `dompdf/dompdf` < 2.0.0 → fixed: 2.0.0

## Affected products (CVE record)

- dompdf dompdf/dompdf: unspecified < 2.0.0

## Severity

- @huntr_ai CVSS 3.0: 9.8 `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- CISA-ADP CVSS 3.1: 9.8 `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub CVSS 3.1: 9.8 `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## Exploitation

- CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
- CISA SSVC assessment: exploitation poc , automatable yes , technical impact total .
- FIRST EPSS (model of 2026-10-21): 1.43% probability of exploitation activity in the next 30 days; percentile 73.

## Sources

- [GitHub Advisory GHSA-577p-7j7h-2jgf](https://github.com/advisories/GHSA-577p-7j7h-2jgf)
- [CVE.org record CVE-2021-3838](https://www.cve.org/CVERecord?id=CVE-2021-3838)
- [NVD entry CVE-2021-3838](https://nvd.nist.gov/vuln/detail/CVE-2021-3838)
- [huntr.com](https://huntr.com/bounties/0bdddc12-ff67-4815-ab9f-6011a974f48e)
- [github.com](https://github.com/dompdf/dompdf/commit/99aeec1efec9213e87098d42eb09439e7ee0bb6a)

---
Source page: https://erroneo.us/security/cve/CVE-2021-3838/ · Security Digest: https://erroneo.us/security/ · More: https://erroneo.us/llms.txt
