{"id":"CVE-2026-121373","aliases":["CVE-2026-121373","GHSA-wm2w-4mgj-vw33"],"related":[],"kind":"vulnerability","state":"published","title":"Symfony: HtmlSanitizer MetaRefreshAttributeSanitizer Matches Only a Narrow Subset of the Browser Refresh Grammar (Incomplete Fix for CVE-2026-48761)","summary":"The Symfony HtmlSanitizer component MetaRefreshAttributeSanitizer, introduced to fix CVE-2026-48761, sanitizes the refresh URL of content attributes of meta tags using a regular expression that is too narrow, allowing sanitization to be bypassed, and resulting in potential URL redirection to untrusted sites in Symfony versions 6.1.x prior to 6.4.50, 7.x prior to 7.4.23, and 8.x prior to 8.1.11.\n\n\n\n\nThe shared declarative refresh steps in the WHATWG HTML Standard require a broader approach: 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 regular expression misses are returned unchanged, so the attacker URL skips UrlSanitizer entirely and both allowLinkSchemes and allowLinkHosts are defeated for the refresh navigation.\n\n\n\n\nThis is reachable under any configuration that allows meta with http-equiv and content, including the documented allowStaticElements() preset.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"The Symfony HtmlSanitizer component MetaRefreshAttributeSanitizer, introduced to fix CVE-2026-48761, sanitizes the refresh URL of content attributes of meta tags using a regular expression that is too narrow, allowing sanitization to be bypassed, and resulting in potential URL redirection to untrusted sites in Symfony versions 6.1.x prior to 6.4.50, 7.x prior to 7.4.23, and 8.x prior to 8.1.11.\n\n\n\n\nThe shared declarative refresh steps in the WHATWG HTML Standard require a broader approach: 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 regular expression misses are returned unchanged, so the attacker URL skips UrlSanitizer entirely and both allowLinkSchemes and allowLinkHosts are defeated for the refresh navigation.\n\n\n\n\nThis is reachable under any configuration that allows meta with http-equiv and content, including the documented allowStaticElements() preset.","source":"cvelist"},{"lang":"en","text":"### Description\n\nThe `MetaRefreshAttributeSanitizer` introduced for CVE-2026-48761 sanitizes the refresh URL only when the `content` attribute matches:\n\n```php\n/^(\\s*\\d+\\s*[;,]\\s*url\\s*=\\s*)([\"\\']?)(.+?)\\2(\\s*)$/i\n```\n\nThe 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.\n\n```php\n$c = (new HtmlSanitizerConfig())->allowStaticElements()->allowLinkHosts(['trusted.example']);\n$s = new HtmlSanitizer($c);\n\n$s->sanitizeFor('head', '<meta http-equiv=\"refresh\" content=\"0;url=https://evil.example/\">');\n// <meta http-equiv=\"refresh\" />, correct\n\n$s->sanitizeFor('head', '<meta http-equiv=\"refresh\" content=\"0 url=https://evil.example/\">');\n$s->sanitizeFor('head', '<meta http-equiv=\"refresh\" content=\"0;https://evil.example/\">');\n$s->sanitizeFor('head', '<meta http-equiv=\"refresh\" content=\"9 , https://evil.example/\">');\n// URL survives in all three, host allow-list defeated\n```\n\nThe 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.\n\nThree 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/`.\n\nThis is reachable under any configuration that allows `meta` with `http-equiv` and `content`, including the documented `allowStaticElements()` preset.\n\n### Resolution\n\nThe 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.\n\nReviewers 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.\n\nThe 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).\n\n### Credits\n\nSymfony would like to thank [Ilia Alshanetsky](https://github.com/iliaal) for reporting the issue.","format":"markdown","source":"ghsa"}],"published":"2026-11-04T12:59:22.585Z","modified":"2026-12-01T21:45:12.400Z","severity":{"scorer":"Checkmarx","scheme":"CVSS:4.0","vector":"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","score":5.3,"rating":"MEDIUM"},"severities":[{"scorer":"Checkmarx","scheme":"CVSS:4.0","vector":"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","score":5.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"MEDIUM"}],"cwes":["CWE-186","CWE-601"],"affected":[{"ranges":[{"type":"git","introduced":"6.1.0","fixed":"6.4.50","status":"affected"},{"type":"git","introduced":"7.0.0","fixed":"7.4.23","status":"affected"},{"type":"git","introduced":"8.0.0","fixed":"8.1.11","status":"affected"}],"vendor":"sensiolabs","product":"symfony","package":"symfony/html-sanitizer","repo":"https://github.com/symfony/html-sanitizer","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"6.1.0","status":"affected","fixed":"6.4.50"}],"ecosystem":"Packagist","package":"symfony/html-sanitizer","purl":"pkg:composer/symfony/html-sanitizer","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"7.0.0","status":"affected","fixed":"7.4.23"}],"ecosystem":"Packagist","package":"symfony/html-sanitizer","purl":"pkg:composer/symfony/html-sanitizer","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"8.0.0","status":"affected","fixed":"8.1.11"}],"ecosystem":"Packagist","package":"symfony/html-sanitizer","purl":"pkg:composer/symfony/html-sanitizer","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"6.1.0","status":"affected","fixed":"6.4.50"}],"ecosystem":"Packagist","package":"symfony/symfony","purl":"pkg:composer/symfony/symfony","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"7.0.0","status":"affected","fixed":"7.4.23"}],"ecosystem":"Packagist","package":"symfony/symfony","purl":"pkg:composer/symfony/symfony","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"8.0.0","status":"affected","fixed":"8.1.11"}],"ecosystem":"Packagist","package":"symfony/symfony","purl":"pkg:composer/symfony/symfony","source":"ghsa"}],"references":[{"url":"https://github.com/symfony/symfony/security/advisories/GHSA-wm2w-4mgj-vw33","tags":["third-party-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/symfony/symfony/commit/2d4c4fe36200858b91132a95076fff3d9de89d26","tags":["patch","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-121373","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/html-sanitizer/CVE-2026-121373.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2026-121373.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/symfony/symfony","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/symfony/symfony/releases/tag/v6.4.50","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/symfony/symfony/releases/tag/v7.4.23","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/symfony/symfony/releases/tag/v8.1.11","tags":["web"],"sources":["ghsa"]}],"credits":["Ilia Alshanetsky","Nicolas Grekas"],"assigner":"Checkmarx","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-11-04T17:49:00.814Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-121373","url":"https://www.cve.org/CVERecord?id=CVE-2026-121373","licence":"CVE Terms of Use","modified":"2026-11-04T18:20:22.620Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-wm2w-4mgj-vw33","url":"https://github.com/advisories/GHSA-wm2w-4mgj-vw33","licence":"CC-BY-4.0","modified":"2026-12-01T21:45:12.400Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-121373","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-121373","licence":"Public domain","modified":"2026-11-06T21:40:43.450Z"}],"updatedAt":"2026-12-01T21:57:10.549Z","epss":{"score":0.0085,"percentile":0.5926,"date":"2026-12-01T12:00:22.000Z"}}