Overly Restrictive Regular Expression Affecting symfony/html-sanitizer package, versions >=6.1, <6.4.50>=7.0.0, <7.4.23>=8.0.0, <8.1.11


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.85% (56th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PHP-SYMFONYHTMLSANITIZER-23188849
  • published1 Dec 2026
  • disclosed4 Nov 2026
  • creditIlia Alshanetsky

Introduced: 4 Nov 2026

NewCVE-2026-121373  (opens in a new tab)
CWE-186  (opens in a new tab)

How to fix?

Upgrade symfony/html-sanitizer to version 6.4.50, 7.4.23, 8.1.11 or higher.

Overview

symfony/html-sanitizer is a Provides an object-oriented API to sanitize untrusted HTML input for safe insertion into a document's DOM.

Affected versions of this package are vulnerable to Overly Restrictive Regular Expression via MetaRefreshAttributeSanitizer in the HtmlSanitizer component, which uses a regular expression too narrow to cover the full WHATWG shared declarative refresh steps grammar. The separator after the time value in a meta http-equiv="refresh" content attribute may be ASCII whitespace alone (without ; or ,), and the url= keyword is optional, but the original pattern only matches a strict subset of these forms. Directives the browser accepts that the regex does not match are returned unchanged, causing the attacker-controlled URL to bypass UrlSanitizer entirely, defeating both allowLinkSchemes and allowLinkHosts for the refresh navigation and enabling open redirect to an untrusted site.

Note: This is only exploitable under configurations that allow meta with http-equiv and content, including the documented allowStaticElements() preset.

CVSS Base Scores

version 4.0
version 3.1