llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Packagist · symfony/html-sanitizer

GHSA-WM2W-4MGJ-VW33

HtmlSanitizer MetaRefreshAttributeSanitizer Matches Only a Narrow Subset of the Browser Refresh Grammar: Incomplete Fix for CVE-2026-48761

Parche disponible
Descargar PNG JSON
CVSS 4.0
5.3
Media
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: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche3 versiones6.4.50 · 7.4.23 · 8.1.11
Exposición16 dDesde la divulgación, 4 nov 2026, 6:43 a. m.
Detección16 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Modificada
Explotación
Remediación
Monitoreo
Detectada +1
4 nov 26
6 nov 26
20 nov 26
21 nov 26
4 nov 26
8 nov 26
12 nov 26
16 nov 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-WM2W-4MGJ-VW33 divulgada · CVSS 5.3 (GitHub)
Divulgación Modificada Última actualización del registro
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés
Description

The `MetaRefreshAttributeSanitizer` introduced for CVE-2026-48761 sanitizes the refresh URL only when the `content` attribute matches:

/^(\s*\d+\s*[;,]\s*url\s*=\s*)(["\']?)(.+?)\2(\s*)$/i

The browser grammar, the WHATWG shared declarative refresh steps, is broader: the separator after the time may be ASCII whitespace alone, with no `;` or `,`, and the `url=` keyword is optional. Directives the browser honours but the regex misses are returned unchanged, so the attacker URL skips `UrlSanitizer` entirely and both `allowLinkSchemes` and `allowLinkHosts` are defeated for the refresh navigation.

$c = (new HtmlSanitizerConfig())->allowStaticElements()->allowLinkHosts(['trusted.example']);
$s = new HtmlSanitizer($c);

$s->sanitizeFor('head', '<meta http-equiv="refresh" content="0;url=https://evil.example/">');
// <meta http-equiv="refresh" />, correct

$s->sanitizeFor('head', '<meta http-equiv="refresh" content="0 url=https://evil.example/">');
$s->sanitizeFor('head', '<meta http-equiv="refresh" content="0;https://evil.example/">');
$s->sanitizeFor('head', '<meta http-equiv="refresh" content="9 , https://evil.example/">');
// URL survives in all three, host allow-list defeated

The rendered `&#61;` is entity-decoded back to `=` by the HTML parser before the refresh algorithm runs, so the browser sees a valid directive. Because the URL never reaches `UrlSanitizer`, a `javascript:` refresh URL is not filtered either.

Three further spellings were found while fixing and are covered by the same patch: `0,https://evil.example/`, `.5;url=https://evil.example/` with an empty integer part, and the specification's incomplete-`url=` quirk `0;uhttps://evil.example/`.

This is reachable under any configuration that allows `meta` with `http-equiv` and `content`, including the documented `allowStaticElements()` preset.

Resolution

The sanitizer now parses the value following the WHATWG shared declarative refresh steps, and it fails safe: once a value looks like a refresh directive, any parse that does not end in a sanitized URL causes the attribute to be dropped rather than passed through.

Reviewers should note one unavoidable consequence. `sanitizeAttribute()` receives only the element name and the attribute value, never `http-equiv`, so every `<meta content>` value must be treated alike. A value such as `<meta name="description" content="10 tips for cooking">` is now dropped, or rewritten as a relative URL when `allowRelativeLinks()` is enabled, because that same string on an `http-equiv="refresh"` element does make a browser navigate. The collateral is bounded to meta `content` values beginning with a digit or a full stop.

The patches for this issue are available here https://github.com/symfony/symfony/commit/2d4c4fe36200858b91132a95076fff3d9de89d26 for branch 6.4 (and forward-ported to 7.4, 8.1 and 8.2).

Credits

We would like to thank Ilia Alshanetsky https://github.com/iliaal for reporting the issue.

We would also like to thank Bruno Dias https://github.com/cx-bruno-dias and Joao Regateiro https://github.com/cx-joao-regateiro from Checkmarx for their help getting a CVE assigned.

Vector CVSS 4.0

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:L
BajaAlta
Requisitos de ataqueAT:N
NingunoPresentes
PrivilegiosPR:N
NingunoBajosAltos
InteracciónUI:P
NingunaPasivaActiva
Confid. (sistema)VC:N
AltoBajoNinguno
Integridad (sistema)VI:N
AltoBajoNinguno
Disponib. (sistema)VA:N
AltoBajoNinguno
Confid. (posterior)SC:L
AltoBajoNinguno
Integridad (posterior)SI:L
AltoBajoNinguno
Disponib. (posterior)SA:N
AltoBajoNinguno
Versiones

Rangos afectados

Afectada Corregida
symfony/html-sanitizer · symfony/symfony≥ 6.1 < 6.4.50
symfony/html-sanitizer · symfony/symfony≥ 7 < 7.4.23
symfony/html-sanitizer · symfony/symfony≥ 8 < 8.1.11
6.1
6.4.50
7
7.4.23
8
8.1.11
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
Packagistsymfony/html-sanitizer
Corregida 6.4.50, 7.4.23, 8.1.11 — —
Packagistsymfony/symfony
Corregida 6.4.50, 7.4.23, 8.1.11 — —
Versiones corregidas6.4.507.4.238.1.11
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/symfony/symfony/security/advisories/GHSA-wm2w-4mgj-vw33

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.