- Severity: MEDIUM
- CVE: CVE-2026-121373
- Ecosystems: composer, composer, composer, composer, composer, composer
- Packages: symfony/html-sanitizer, symfony/html-sanitizer, symfony/html-sanitizer, symfony/symfony, symfony/symfony, symfony/symfony
### Description
The `MetaRefreshAttributeSanitizer` introduced for CVE-2026-48761 sanitizes the refresh URL only when the `content` attribute matches:
“`php
/^(\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.
“`php
$c = (new HtmlSanitizerConfig())->allowStaticElements()->allowLinkHosts([‘trusted.example’]);
$s = new HtmlSanitizer($c);
$s->sanitizeFor(‘head’, ”);
// , correct
$s->sanitizeFor(‘head’, ”);
$s->sanitizeFor(‘head’, ”);
$s->sanitizeFor(‘head’, ”);
// URL survives in all three, host allow-list defeated
“`
The rendered `=` 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 `me…
Source: GitHub Security Advisories · 2026-12-01