What’s Vulnerable › Vulnerabilities
CVE-2021-3902: Improper Restriction of XML External Entity Reference in dompdf/dompdf
- Severity: critical (CVSS 9.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 1.0% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2024-11-15 · updated 2026-06-17
- Weakness: CWE-611
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.
Affected products
- dompdf: before 2.0.0 — fixed in 2.0.0
- Packagist Dompdf/Dompdf: before 2.0.0; v0.6.0, v0.6.1, v0.6.2, v0.7.0, v0.7.0-beta, v0.7.0-beta2 (+16) — fixed in 2.0.0
How to fix
Upgrade to a fixed version: dompdf 2.0.0; Packagist Dompdf/Dompdf 2.0.0. Check the vendor advisory for mitigations.
References
- https://github.com/dompdf/dompdf/commit/f56bc8e40be6c0ae0825e6c7396f4db80620b799
- https://huntr.com/bounties/a6071c07-806f-429a-8656-a4742e4191b1
Get alerted when CVE-2021-3902 or the next vulnerability affects your stack