Overly Restrictive Regular Expression Affecting symfony/html-sanitizer package, versions >=6.1, <6.4.51>=7.0.0, <7.4.24>=8.0.0, <8.1.12


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.83% (55th 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-23188854
  • published1 Dec 2026
  • disclosed25 Nov 2026
  • creditVincent Cassiau

Introduced: 25 Nov 2026

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

How to fix?

Upgrade symfony/html-sanitizer to version 6.4.51, 7.4.24, 8.1.12 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, when a <meta http-equiv="refresh"> directive's content attribute begins with a vertical tab or a Unicode space (U+1680, U+2000-U+200A, U+2028, U+205F, U+3000) before the refresh time, the sanitizer fails to recognise the directive as a refresh and returns the value unchanged. As a result, the URL is never checked against allowLinkHosts() or allowLinkSchemes(), and Chromium-based browsers follow the unvalidated URL, enabling an attacker to inject arbitrary redirect targets into sanitized HTML.

Note: This is only exploitable when meta elements are allowed with their http-equiv and content attributes (e.g. via allowStaticElements()) and content is sanitized with sanitizeFor('head', ...). Firefox and Safari are not affected as they skip only ASCII whitespace before the refresh time.

CVSS Base Scores

version 4.0
version 3.1