{"id":"CVE-2026-73490","aliases":["CVE-2026-73490","GHSA-9wjq-cp2p-hrgf"],"related":[],"kind":"vulnerability","state":"published","title":"Loofah: SVG `href` attribute bypasses local-reference restriction","summary":"Loofah is a general library for manipulating and transforming HTML/XML documents and fragments, built on top of Nokogiri. Prior to 2.25.2, Loofah's HTML5 sanitizer applies its local-reference restriction only to the xlink:href attribute on SVG use and feImage elements, while browsers also accept the plain href attribute. A crafted sanitized SVG can therefore reference an arbitrary same-origin external document; use may render external SVG content containing scripts or other dangerous content, and feImage may load external images for tracking. Applications that sanitize user-supplied SVG with Loofah's default allowlist are affected. This issue is fixed in version 2.25.2.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Loofah is a general library for manipulating and transforming HTML/XML documents and fragments, built on top of Nokogiri. Prior to 2.25.2, Loofah's HTML5 sanitizer applies its local-reference restriction only to the xlink:href attribute on SVG use and feImage elements, while browsers also accept the plain href attribute. A crafted sanitized SVG can therefore reference an arbitrary same-origin external document; use may render external SVG content containing scripts or other dangerous content, and feImage may load external images for tracking. Applications that sanitize user-supplied SVG with Loofah's default allowlist are affected. This issue is fixed in version 2.25.2.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nLoofah's HTML5 sanitizer restricted only the `xlink:href` attribute on certain SVG elements to local, same-document references. Browsers also accept a plain `href` attribute as an alternative to the deprecated `xlink:href` per the SVG 2 spec, but Loofah did not apply the same restriction to it, allowing those elements to reference arbitrary external documents.\n\n## Impact\n\nSVG `<use>` can load and render external SVG content by reference. If the referenced external SVG is same-origin and contains scripts or other dangerous content, it could execute in the context of the sanitized document. `<feImage>` can load external images, which can be used for tracking. Modern browsers restrict cross-origin `<use>` fetches, which limits but does not eliminate the risk.\n\nApplications that sanitize user-supplied SVG (directly, or as part of HTML) with Loofah's default allowlist are affected.\n\n## Mitigation\n\nUpgrade to Loofah >= 2.25.2.\n\n## Credit\n\nFound by the maintainer, Mike Dalessio, during a security audit.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Loofah es una biblioteca general para manipular y transformar documentos y fragmentos HTML/XML, construida sobre Nokogiri. Antes de la versión 2.25.2, el saneador HTML5 de Loofah aplica su restricción de referencia local solo al atributo xlink:href en los elementos SVG use y feImage, mientras que los navegadores también aceptan el atributo href simple. Un SVG saneado y elaborado puede, por lo tanto, hacer referencia a un documento externo de mismo origen arbitrario; use puede renderizar contenido SVG externo que contenga scripts u otro contenido peligroso, y feImage puede cargar imágenes externas para seguimiento. Las aplicaciones que sanean SVG proporcionado por el usuario con la lista de permitidos predeterminada de Loofah se ven afectadas. Este problema está solucionado en la versión 2.25.2.","source":"nvd"}],"published":"2026-07-21T22:01:58.000Z","modified":"2026-10-24T15:10:00.190Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N","score":4.7,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N","score":4.7,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N","score":4.7,"rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":"< 2.25.2","status":"affected"}],"vendor":"flavorjones","product":"loofah","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.25.2"}],"ecosystem":"RubyGems","package":"loofah","purl":"pkg:gem/loofah","source":"ghsa"}],"references":[{"url":"https://github.com/flavorjones/loofah/security/advisories/GHSA-9wjq-cp2p-hrgf","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/flavorjones/loofah/pull/308","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/flavorjones/loofah/commit/20867b9be689521887364b74822c41ef830523c9","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/flavorjones/loofah/releases/tag/v2.25.2","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/flavorjones/loofah","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-08-13T13:01:37.604Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-73490","url":"https://www.cve.org/CVERecord?id=CVE-2026-73490","licence":"CVE Terms of Use","modified":"2026-08-13T13:01:57.912Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-9wjq-cp2p-hrgf","url":"https://github.com/advisories/GHSA-9wjq-cp2p-hrgf","licence":"CC-BY-4.0","modified":"2026-09-10T03:51:11.411Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-73490","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-73490","licence":"Public domain","modified":"2026-10-24T15:10:00.190Z"}],"updatedAt":"2026-11-25T22:59:32.663Z","epss":{"score":0.0018,"percentile":0.07933,"date":"2026-12-01T12:00:22.000Z"}}