# CVE-2021-3902: Improper Restriction of XML External Entity Reference in dompdf/dompdf

- Severity: Critical 9.8 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.95%, higher than 62% of CVEs (2026-12-02)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2024-11-15T10:52:10.986Z
- Modified: 2026-06-17T04:05:57.500Z
- Also known as: GHSA-3vjh-xrhf-v9xh
- Weaknesses: CWE-611
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total
- Assigned by: @huntr_ai

## Description

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.

(As written by CVE List.)

## Affected

- dompdf dompdf/dompdf: from unspecified before 2.0.0
- dompdf dompdf: before 2.0.0
- dompdf/dompdf (Packagist): before 2.0.0
- dompdf_project dompdf: before 2.0.0

## Every score

- @huntr_ai: CVSS:3.0 9.8 Critical `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 Critical `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 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://huntr.com/bounties/a6071c07-806f-429a-8656-a4742e4191b1> (exploit, issue-tracking, patch, third-party-advisory, web)
- <https://github.com/dompdf/dompdf/commit/f56bc8e40be6c0ae0825e6c7396f4db80620b799> (patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-3902> (advisory)
- <https://github.com/dompdf/dompdf> (package)

## Sources

- CVE List: [CVE-2021-3902](https://www.cve.org/CVERecord?id=CVE-2021-3902), CVE Terms of Use, modified 2024-11-18
- GitHub Advisory Database: [GHSA-3vjh-xrhf-v9xh](https://github.com/advisories/GHSA-3vjh-xrhf-v9xh), CC-BY-4.0, modified 2024-11-18
- NVD: [CVE-2021-3902](https://nvd.nist.gov/vuln/detail/CVE-2021-3902), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-3902 · Whole record: https://cve.day/CVE-2021-3902.json · Rebuilt by cve.day 2026-11-25T22:58:08.965Z
