Dompdf possible DoS caused by infinite recursion when parsing SVG images
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub. Impact type from CWE-674.
Summary
Dompdf is an HTML to PDF converter for PHP. When parsing SVG images Dompdf performs an initial validation to ensure that paths within the SVG are allowed. One of the validations is that the SVG document does not reference itself. However, prior to version 2.0.4, a recursive chained using two or more SVG documents is not correctly validated. Depending on the system configuration and attack pattern this could exhaust the memory available to the executing process and/or to the server itself. php-svg-lib, when run in isolation, does not support SVG references for `image` elements. However, when used in combination with Dompdf, php-svg-lib will process SVG images referenced by an `image` element. Dompdf currently includes validation to prevent self-referential `image` references, but a chained reference is not checked. A malicious actor may thus trigger infinite recursion by chaining references between two or more SVG images. When Dompdf parses a malicious payload, it will crash due after exceeding the allowed execution time or memory usage. An attacker sending multiple request to a system can potentially cause resource exhaustion to the point that the system is unable to handle incoming request. Version 2.0.4 contains a fix for this issue.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| dompdf | dompdf | before 2.0.4 | 2.0.4 | Patch available | CNA |
| — | dompdf/dompdf (Packagist) | before 2.0.4 | 2.0.4 | Patch available | GHSA-3qx2-6f78-w2j2 |
- dompdf Vendordompdf Affected before 2.0.4 Fixed in 2.0.4 Patch available CNA
- dompdf/dompdf (Packagist) Vendor— Affected before 2.0.4 Fixed in 2.0.4 Patch available GHSA-3qx2-6f78-w2j2
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:dompdf_project:dompdf:*:*:*:*:*:*:*:* | up to 2.0.3 | Vulnerable | Dompdf Project |
- cpe:2.3:a:dompdf_project:dompdf:*:*:*:*:*:*:*:* Versions up to 2.0.3 Vulnerable ·Dompdf Project
Remediation
- Fix · CNA dompdf (dompdf) Fixed in 2.0.4
- Fix · GHSA-3qx2-6f78-w2j2 dompdf/dompdf (Packagist) Fixed in 2.0.4 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2023-50262
- 2026-10-03 Alias added: GHSA-3qx2-6f78-w2j2
References
More dompdf vulnerabilities
- TI-2023-10313 URI validation failure on SVG parsing. Bypass of CVE-2023-23924 CVSS 3.1CRITICAL 10.0
- TI-2023-09722 URI validation failure on SVG parsing in Dompdf CVSS 3.1CRITICAL 10.0
- TI-2021-02812 Improper Restriction of XML External Entity Reference in dompdf/dompdf CVSS 3.1CRITICAL 9.8
- TI-2021-02769 PHAR Deserialization in dompdf/dompdf CVSS 3.1CRITICAL 9.8
- TI-2024-16571 php-svg-lib lacks path validation on font through SVG inline styles CVSS 3.1CRITICAL 9.8
- TI-2023-27479 php-svg-lib possible DoS caused by infinite recursion when parsing SVG document CVSS 3.1HIGH 7.5
Sources
- CVE-2023-50262 · CVE Program
- CVE-2023-50262 · NVD
- FIRST EPSS
- GHSA-3qx2-6f78-w2j2 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences