---
title: "CVE-2021-3902: Improper Restriction of XML External Entity Reference in dompdf/dompdf"
url: https://erroneo.us/security/cve/CVE-2021-3902/
description: "CVE-2021-3902 (dompdf/dompdf (Composer (PHP))): An improper restriction of external entities (XXE) vulnerability in dompdf/dompdf's SVG parser allows for…"
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-3902"
kev: false
cvss: 9.8
epss: 0.00951
license: All rights reserved. Quote with attribution and a link.
---

# CVE-2021-3902: Improper Restriction of XML External Entity Reference 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.0% , percentile 61: FIRST’s model estimates a 1.0% chance of exploitation activity in the next 30 days, higher than 61% 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

An improper restriction of external entities (XXE) vulnerability in dompdf/dompdf's SVG parser allows for Server-Side Request Forgery (SSRF) and deserialization attacks. This issue affects all versions prior to 2.0.0. The vulnerability can be exploited even if the isRemoteEnabled option is set to false. It allows attackers to perform SSRF, disclose internal image files, and cause PHAR deserialization attacks.

## 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): 0.95% probability of exploitation activity in the next 30 days; percentile 61.

## Sources

- [GitHub Advisory GHSA-3vjh-xrhf-v9xh](https://github.com/advisories/GHSA-3vjh-xrhf-v9xh)
- [CVE.org record CVE-2021-3902](https://www.cve.org/CVERecord?id=CVE-2021-3902)
- [NVD entry CVE-2021-3902](https://nvd.nist.gov/vuln/detail/CVE-2021-3902)
- [huntr.com](https://huntr.com/bounties/a6071c07-806f-429a-8656-a4742e4191b1)
- [github.com](https://github.com/dompdf/dompdf/commit/f56bc8e40be6c0ae0825e6c7396f4db80620b799)

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