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

Source: https://junglewise.ai/threats/cve-2021-3902-improper-restriction-of-xml-external-entity-reference-in-dompdf  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2024-11-15  
License: CC BY 4.0 with a link back

CVE-2021-3902 · Severity: low · CVSS 3.1 · Published 2024-11-15

Improper Restriction of XML External Entity Reference in dompdf/dompdf

Technologies: [dompdf/dompdf (Packagist)](https://junglewise.ai/threats/technologies/dompdf-dompdf). Vendors: [Packagist](https://junglewise.ai/threats/vendors/packagist).

## Quick answers

**Is CVE-2021-3902 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2021-3902 being exploited in the wild.

**How severe is CVE-2021-3902?** Low severity, with a CVSS score of 3.1, published 15 November 2024.

**Which products and versions are affected?** dompdf/dompdf (Packagist) ECOSYSTEM:introduced=0,fixed=2.0.0.

**Is there a fix for CVE-2021-3902?** Yes. dompdf/dompdf (Packagist): upgrade to 2.0.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2021-3902?** Check whether you run dompdf/dompdf (Packagist) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- dompdf/dompdf (Packagist): upgrade to 2.0.0 or later

  ```sh
  composer require dompdf/dompdf:^2.0.0
  ```


## Affected products

- dompdf/dompdf (Packagist) ECOSYSTEM:introduced=0,fixed=2.0.0

## Identifiers

- CVE-2021-3902
- GHSA-3vjh-xrhf-v9xh

## Related threats

- [Dompdf information disclosure via SVG image references](https://junglewise.ai/threats/cve-2026-59943-dompdf-information-disclosure-via-svg-image-references)
- [Dompdf resource exhaustion Denial of Service via oversized images](https://junglewise.ai/threats/cve-2026-59942-dompdf-resource-exhaustion-denial-of-service-via-oversized-images)
- [Dompdf uncontrolled resource consumption in BMP processing](https://junglewise.ai/threats/cve-2026-59941-dompdf-uncontrolled-resource-consumption-in-bmp-processing)
- [Dompdf local file read via SVG data-URI bypass](https://junglewise.ai/threats/cve-2026-56722-dompdf-local-file-read-via-svg-data-uri-bypass)
- [Dompdf file existence oracle in CSS @font-face directive](https://junglewise.ai/threats/cve-2026-55555-dompdf-file-existence-oracle-in-css-font-face-directive)
