Skip to content
Heist/ feed
Back to feed
Medium

php-svg-lib possible DoS caused by infinite recursion when parsing SVG document

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2023-50251
Confirmed fixed CVEs
Not specified
Updated in this feed
6 Nov 2026, 04:00 UTC · Revision 1

Source evidence

php-svg-lib possible DoS caused by infinite recursion when parsing SVG document

core-osv · Original source

Published 12 Dec 2023, 20:37 UTC

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.

osv:CVE-2023-50251
Complete source record
{
  "id": "bf6b1533f529351719b9dc8b887d8336effb817fab48f9e59a17bd7ef72525cc",
  "url": "https://osv.dev/vulnerability/CVE-2023-50251",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "php-svg-lib possible DoS caused by infinite recursion when parsing SVG document",
    "summary": "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.",
    "evidence": "osv:CVE-2023-50251",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2023-50251",
      "aliases": [
        "CVE-2023-50251",
        "GHSA-ff5x-7qg5-vwf2"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/dompdf/php-svg-lib",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "8a8a1ebcf6aea861ef30197999f096f7bd4b4456"
                },
                {
                  "fixed": "88163cbe562d9b391b3a352e54d9c89d02d77ee0"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:dompdf:php-svg-lib:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "0.5.1"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "88163cbe562d9b391b3a352e54d9c89d02d77ee0"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "0.5.0",
            "0.4.1",
            "0.4.0",
            "0.3.4",
            "v0.3.3",
            "v0.3.2",
            "v0.3.1",
            "v0.3.0",
            "v0.3",
            "v0.2",
            "v0.1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-50251.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:46.660341467Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/50xxx/CVE-2023-50251.json",
        "https://github.com/dompdf/php-svg-lib/security/advisories/GHSA-ff5x-7qg5-vwf2",
        "https://nvd.nist.gov/vuln/detail/CVE-2023-50251",
        "https://github.com/dompdf/php-svg-lib/commit/88163cbe562d9b391b3a352e54d9c89d02d77ee0"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-674"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/50xxx/CVE-2023-50251.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2023-50251",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 514555,
  "published_at": "2023-12-12T20:37:23.035+00:00"
}