CVE-2021-3902 Improper Restriction of XML External Entity Reference in dompdf/dompdf
Attackers can exploit an XXE flaw in the SVG parser to perform SSRF, disclose internal files, or trigger PHAR deserialization, even with remote features disabled.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-3902?
CVE-2021-3902 is a critical vulnerability in dompdf/dompdf, published on 15 Nov 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official 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.
Weakness: CWE-611
Which versions are affected by CVE-2021-3902?
2 open source packages ship an affected version, including dompdf/dompdf. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
dompdf/dompdf Packagist | All versions | 2.0.0 |
dompdf/dompdf Packagist | All versions | 2.0.0 |
Products include Dompdf Project Dompdf.
How do I fix CVE-2021-3902?
Upgrade dompdf/dompdf to 2.0.0 or later.
Is CVE-2021-3902 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2021-3902 exists.
Other vulnerabilities in dompdf/dompdf
Sources
Also known as DEBIAN-CVE-2021-3902, GHSA-3vjh-xrhf-v9xh.