LiveActive security incident?Get immediate response
CVE Record

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

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.

CriticalCVSS 9.8Not KEV-listedUpdated
Glexia's TakeAutomated analysiscritical

Security readout for executives and security teams

Plain-English summary

dompdf is a PHP library used to generate PDFs. This CVE lets malicious SVG content trigger XML external entity handling in dompdf before 2.0.0, creating risk of internal network requests, local image disclosure, and PHP PHAR deserialization. The high score reflects remote, unauthenticated impact when applications process attacker-controlled content.

Executive priority

Treat this as urgent for any service generating PDFs from external input. The business risk is data exposure or internal service access through a document-rendering feature that may look low risk operationally.

Technical view

CVE-2021-3902 is a CWE-611 XXE flaw in dompdf/dompdf's SVG parser. Sources state all versions before 2.0.0 are affected, and exploitation can work even when isRemoteEnabled is false. Reported impacts include SSRF, internal image file disclosure, and PHAR deserialization attacks.

Likely exposure

Exposure is most likely in PHP applications using dompdf/dompdf before 2.0.0 to render PDFs from user-controlled HTML or SVG. Systems that only process trusted static templates have lower practical exposure, but still need version validation.

Exploitation context

The source bundle does not show CISA KEV listing or confirmed active exploitation. The vulnerability is still high urgency because it is remote, unauthenticated, low-complexity, and affects common PDF-generation workflows involving attacker-controlled content.

Researcher notes

Key validation is dependency version plus data-flow review. The important nuance is that isRemoteEnabled=false is not a complete control for this issue, according to the source description. Avoid assuming exploit activity without separate evidence.

Mitigation direction

  • Inventory applications and dependencies using dompdf/dompdf.
  • Upgrade dompdf/dompdf to version 2.0.0 or later.
  • Do not rely on isRemoteEnabled=false as a protection.
  • If upgrade is delayed, check dompdf guidance and limit untrusted SVG rendering.
  • Prioritize internet-facing PDF generation paths first.

Validation and detection

  • Check composer.json and composer.lock for dompdf/dompdf versions below 2.0.0.
  • Identify routes or jobs that generate PDFs from user-supplied HTML or SVG.
  • Confirm deployed builds use the upgraded dompdf package.
  • Review PDF-generation logs for unusual internal-resource access patterns.
  • Add regression tests covering untrusted SVG handling where applicable.
Prepared
Confidence
high
Sources
4

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-611: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
description · low confidence lookup

Cloud metadata behavior lookup

The CVE wording references SSRF or metadata access, so cloud discovery and credential material review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2021-3902 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Critical
CVSS
9.8 (3.0)
Known Exploited
No
Published

Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
3Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
9.8CVSS 3.0CriticalCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H3.95.9Primary CVE score

Vulnerability scoring details

Base CVSS 3.0 score

9.8Critical
CVSS 3.0 vector shape for CVE-2021-3902Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
dompdfdompdf/dompdfunspecifiedListed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-611 · source CWE mapping

Improper Restriction of XML External Entity Reference

Improper Restriction of XML External Entity Reference represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.