Svg sanitize: svg-sanitizer: Mixed-case xlink:HrEf skips the `<use>` nesting-DoS check in Resolver::processReferences (CVE-2026-107381)
Description
A case sensitivity bug in the enshrined/svg-sanitize library allows a denial-of-service (DoS) attack via specially crafted SVG files. The vulnerability arises because the Resolver::processReferences() method selects <use> elements by case-sensitive attribute names, missing mixed-case variants like 'xlink:HrEf'. Later, the sanitizer normalizes these attributes back to canonical casing, reactivating the malicious nested <use> elements that the DoS protection is meant to remove. This allows an attacker who can upload or submit SVGs to bypass the nesting limit and cause resource exhaustion.
CVSS v3.1
Score 6.5medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability (CVE-2026-107381) in enshrined/svg-sanitize occurs because the Resolver::processReferences() function uses a case-sensitive XPath query to collect <use> elements with 'href' or 'xlink:href' attributes. If an attacker uses a mixed-case attribute such as 'xlink:HrEf', these elements are not added to the reference graph and thus not removed by the nesting-DoS mitigation. Later in the sanitization process, the attribute names are normalized back to lowercase, resulting in a fully live nesting bomb that the sanitizer intended to neutralize. This flaw is a mirror of a previous issue (CVE-2025-55166) but affects the attribute name matching rather than the attribute value. The vulnerability affects versions prior to 1.0.0 of the library. Proof-of-concept tests demonstrate that the sanitizer fails to remove nested <use> elements when mixed-case attributes are used, enabling a denial-of-service condition.
Potential Impact
An attacker with the ability to upload or submit SVG files to an application using the vulnerable version of enshrined/svg-sanitize can bypass the nesting limit protection and cause a denial-of-service by submitting SVGs with mixed-case 'xlink:HrEf' attributes. This leads to resource exhaustion or application instability due to the processing of deeply nested <use> elements that should have been removed. No privileges beyond the ability to submit SVG content are required. There is no impact on confidentiality or integrity, only availability.
Mitigation Recommendations
A patch is available for this vulnerability. The recommended fix is to make the attribute name matching case-insensitive when building the reference graph or to reorder the sanitization steps so that attribute names are normalized before the reference graph is constructed. Users should update to a patched version of enshrined/svg-sanitize that addresses this issue. Until patched, applications should consider rejecting SVG inputs with mixed-case 'xlink:href' attributes or apply additional sanitization to normalize attribute names prior to processing.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-m9xh-6747-9r6f
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-107381"]
- Ecosystems
- ["Packagist"]
- Database Specific Severity
- MODERATE
- Cvss Version
- 3.1
Threat ID: 6ac80f0e2cdf04f656390499
Added to database: 10/08/2026, 21:45:50 UTC
Last enriched: 10/08/2026, 21:50:12 UTC
Last updated: 10/08/2026, 21:50:12 UTC
Views: 2
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.