---
id: CVE-2026-107381
title: svg-sanitizer is a PHP SVG/XML sanitizer
summary: >-
  svg-sanitizer is a PHP SVG/XML sanitizer. Prior to 1.0.0,
  Resolver::processReferences() in src/ElementReference/Resolver.php builds the
  SVG <use> reference graph with a case-sensitive href attribute predicate
  before cleanHrefAttributes()…
severity: medium
cvss: 6.5
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H'
cwe:
  - CWE-178
  - CWE-400
vendor: enshrined
product: enshrined/svg-sanitize
affected:
  - enshrined/svg-sanitize <= 0.22.0
patched:
  - enshrined/svg-sanitize 1.0.0
published: '2026-10-14'
updated: '2026-10-14'
sourceUpdated: '2026-10-14T15:17:06.327'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-107381'
references:
  - url: >-
      https://github.com/darylldoyle/svg-sanitizer/commit/2dff6628314de8519155b7feb218bbe132785757
    label: security-advisories@github.com
  - url: 'https://github.com/darylldoyle/svg-sanitizer/releases/tag/1.0.0'
    label: security-advisories@github.com
  - url: >-
      https://github.com/darylldoyle/svg-sanitizer/security/advisories/GHSA-m9xh-6747-9r6f
    label: security-advisories@github.com
  - url: 'https://github.com/advisories/GHSA-m9xh-6747-9r6f'
tags:
  - nvd
  - ghsa
  - composer
  - cve.org
  - exploit-available
aliases:
  - GHSA-m9xh-6747-9r6f
ecosystem: composer
ingestedAt: '2026-10-08T20:06:22.193Z'
epss: 0.00468
epssPercentile: 0.40332
exploitAvailable: true
ssvc:
  exploitation: poc
  automatable: 'no'
  technicalImpact: partial
  timestamp: '2026-10-18T13:36:10.730964Z'
---

## Overview

svg-sanitizer is a PHP SVG/XML sanitizer. Prior to 1.0.0, Resolver::processReferences() in src/ElementReference/Resolver.php builds the SVG <use> reference graph with a case-sensitive href attribute predicate before cleanHrefAttributes() normalizes mixed-case names. An attacker can provide xlink:HrEf on nested <use> elements so the graph omits those references, after which the sanitizer converts the attribute to canonical xlink:href and returns the live nesting structure without applying the useNestingLimit protection. A consuming application that renders the sanitized SVG can therefore be exposed to the resource exhaustion that control is designed to prevent. This issue is fixed in version 1.0.0.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.

## Package advisory (CVE-2026-107381)

Affected packages:

- `enshrined/svg-sanitize <= 0.22.0`

Patched in:

- `enshrined/svg-sanitize 1.0.0`

Source: https://github.com/advisories/GHSA-m9xh-6747-9r6f
