CVE-2026-126206
Loofah cross-site scripting via data URI in URL filter helper
A remote attacker can run scripts in a victim's browser if they click a crafted link the app renders as HTML.
Texto original en inglés · Ver en español
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
Fuente: CNA
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Remediación | Parche 2.25.3 | loofah · -10 d desde divulgación | |
| Divulgación | Publicada | CVE-2026-126206 divulgada · CVSS 5.3 (CNA) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Fuente: OSV | Registro visto por primera vez en OSV | |
| Monitoreo | Fuente: NIST NVD | Registro visto por primera vez en NIST NVD | |
| Divulgación | Evaluación SSVC | CISA-ADP · explotación ninguna | |
| Divulgación | Modificada | Última actualización del registro | |
| Monitoreo | Fuente: ENISA EUVD | Registro visto por primera vez en ENISA EUVD | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Loofah, an HTML and XML manipulation library, has a flaw in its allowed_uri? helper that treats a data URI using the / reference as safe plain text, while browsers read it as HTML. A remote attacker can use this to cause cross-site scripting in an application that checks user-supplied URLs with this helper and renders them in href or similar attributes, but a user must take an action, such as clicking a link.
Descripción original del registro (GitHub_M)
Loofah is a general library for manipulating and transforming HTML/XML documents and fragments, built on top of Nokogiri. In 2.25.2, Loofah::HTML5::Scrub.allowed_uri? treats a data URI mediatype containing the HTML5 named solidus reference / as malformed and falls back to the allowed text/plain, while a browser decodes the reference and interprets the same value as text/html. An application that validates a user-controlled URL with this helper and renders the approved value in href or another browser-interpreted URI attribute can allow cross-site scripting. Rails::HTML::Sanitizer.allowed_uri? re-exports the affected helper. Loofah's default sanitize() path is not affected because Nokogiri decodes the entity before URI validation. This issue is fixed in version 2.25.3.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
rubygemsloofah |
Corregida | 2.25.3 | -10 d | 2.25.3 no afectada |
2.25.3Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/flavorjones/loofah/security/advisories/GHSA-jcff-cj73-4w4fhttps://github.com/flavorjones/loofah/pull/324https://github.com/flavorjones/loofah/commit/ad92002966053309f83b550861e2ef04bc714744https://github.com/flavorjones/loofah/releases/tag/v2.25.3Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
