本文へ移動
English version →
中 5.3

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

CVE-2026-121373 SecPulse初出

影響パッケージ

パッケージ影響を受ける版 → 修正版
sensiolabssymfony
6.1.0 以上 6.4.50 未満→ 6.4.50
7.0.0 以上 7.4.23 未満→ 7.4.23
8.0.0 以上 8.1.11 未満→ 8.1.11
composersymfony/html-sanitizer
8.1.11 未満→ 8.1.11
composersymfony/symfony
8.1.11 未満→ 8.1.11
Packagistsymfony/html-sanitizer
8.0.0 以上 8.1.11 未満→ 8.1.11
Packagistsymfony/symfony
8.0.0 以上 8.1.11 未満→ 8.1.11

ディストリビューション別の修正状況

各ディストリビューションが公開している、この CVE の記録です。修正版は配布版ごとに違うので、リンク先で確かめてください。

原文の説明 取得元が公開している説明をそのまま載せています (多くは英語)。

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', '');
// , 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…

出典: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory

参照URL

当サイトでは、アクセス解析と広告の効果測定のためにCookieを使います。株式会社Gameのサイト共通の設定です。 詳しく