Vulnerability · Published Jan 31, 2023 · Assigned by GitHub_M
CVE-2023-23924URI validation failure on SVG parsing in Dompdf
Critical 10.0
In plain English
A critical-severity security flaw in dompdf from dompdf. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 3.6% (higher than 89% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.
Official description
Dompdf is an HTML to PDF converter. The URI validation on dompdf 2.0.1 can be bypassed on SVG parsing by passing `<image>` tags with uppercase letters. This may lead to arbitrary object unserialize on PHP < 8, through the `phar` URL wrapper. An attacker can exploit the vulnerability to call arbitrary URL with arbitrary protocols, if they can provide a SVG file to dompdf. In PHP versions before 8.0.0, it leads to arbitrary unserialize, that will lead to the very least to an arbitrary file deletion and even remote code execution, depending on classes that are available.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Packagist | dompdf/dompdf | 2.0.2 | GHSA-3cw5-7cxw-v5qg |
Affected products (as reported)
Weakness: CWE-551 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:H
References
- https://github.com/dompdf/dompdf/security/advisories/GHSA-3cw5-7cxw-v5qg x_refsource_CONFIRM
- https://github.com/dompdf/dompdf/commit/7558f07f693b2ac3266089f21051e6b78c6a0c85 x_refsource_MISC
- https://github.com/dompdf/dompdf/releases/tag/v2.0.2 x_refsource_MISC