GHSA-wm2w-4mgj-vw33: Symfony: HtmlSanitizer MetaRefreshAttributeSanitizer Matches Only a Narrow Subset of the Browser Refresh Grammar (Incomplete Fix for CVE-2026-48761)
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.
The 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.
This is reachable under any configuration that allows meta with http-equiv and content, including the documented allowStaticElements() preset.
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Symfony HtmlSanitizerto a version that resolves this vulnerability.Fixed in 6.4.50 - Upgrade
Upgrade
Symfony HtmlSanitizerto a version that resolves this vulnerability.Fixed in 7.4.23 - Upgrade
Upgrade
Symfony HtmlSanitizerto a version that resolves this vulnerability.Fixed in 8.1.11
Event History
Frequently Asked Questions
Which deployments are exposed to this bypass?
Deployments are exposed when they use the Symfony HtmlSanitizer component and permit meta elements with both http-equiv and content attributes. This includes the documented allowStaticElements() preset.
What does an attacker need to exploit it?
An attacker needs a way to supply HTML that is processed by the sanitizer and retained in a meta refresh directive. They can use browser-valid refresh syntax that has whitespace after the delay without a semicolon or comma, or that omits the optional url= keyword.
Why do URL scheme and host allowlists not prevent the redirect?
For refresh directives the regular expression does not recognize, the sanitizer returns the content unchanged. The attacker-controlled URL therefore bypasses UrlSanitizer, defeating both allowLinkSchemes and allowLinkHosts for that refresh navigation.
Which versions need remediation?
Affected versions are Symfony 6.1.x before 6.4.50, 7.x before 7.4.23, and 8.x before 8.1.11. Upgrade to the applicable fixed version.
What can be done if upgrading is not immediately possible?
Prevent sanitized content from allowing meta elements with http-equiv and content attributes, including by avoiding the allowStaticElements() preset where it enables them. This removes the stated reachable path for meta refresh navigation.