# CVE-2023-50251: php-svg-lib possible DoS caused by infinite recursion when parsing SVG document

- Severity: Medium 5.3 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.88%, higher than 60% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2023-12-12T20:37:23.035Z
- Modified: 2026-06-17T06:39:23.090Z
- Also known as: GHSA-ff5x-7qg5-vwf2
- Weaknesses: CWE-674
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: GitHub_M

## Description

php-svg-lib is an SVG file parsing / rendering library. Prior to version 0.5.1, when parsing the attributes passed to a `use` tag inside an svg document, an attacker can cause the system to go to an infinite recursion. Depending on the system configuration and attack pattern this could exhaust the memory available to the executing process and/or to the server itself. An attacker sending multiple request to a system to render the above payload can potentially cause resource exhaustion to the point that the system is unable to handle incoming request. Version 0.5.1 contains a patch for this issue.

(As written by CVE List.)

## Affected

- dompdf php-svg-lib: < 0.5.1; before 0.5.1
- phenx/php-svg-lib (Packagist): before 0.5.1

## Every score

- GitHub_M: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`
- GitHub: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://github.com/dompdf/php-svg-lib/security/advisories/GHSA-ff5x-7qg5-vwf2> (exploit, vendor-advisory, web)
- <https://github.com/dompdf/php-svg-lib/commit/88163cbe562d9b391b3a352e54d9c89d02d77ee0> (patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2023-50251> (advisory)
- <https://github.com/dompdf/php-svg-lib> (package)

## Sources

- CVE List: [CVE-2023-50251](https://www.cve.org/CVERecord?id=CVE-2023-50251), CVE Terms of Use, modified 2025-05-22
- GitHub Advisory Database: [GHSA-ff5x-7qg5-vwf2](https://github.com/advisories/GHSA-ff5x-7qg5-vwf2), CC-BY-4.0, modified 2024-02-16
- NVD: [CVE-2023-50251](https://nvd.nist.gov/vuln/detail/CVE-2023-50251), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2023-50251 · Whole record: https://cve.day/CVE-2023-50251.json · Rebuilt by cve.day 2026-11-25T22:58:31.265Z
