CVE-2026-121373: Symfony HtmlSanitizer MetaRefreshAttributeSanitizer Matches Only A Vulnerability
MODERATECVE-2026-121373 is a MODERATE htmlsanitizer metarefreshattributesanitizer matches only a vulnerability (CWE-186: Overly Restrictive Regular Expression) affecting Symfony libraries in the Packagist ecosystem. The issue involves htmlsanitizer metarefreshattributesanitizer matches only a narrow subset of the browser refresh grammar: incomplete fix for cve-2026-48761. Remediation is available by upgrading affected packages to version 6.4.50, 7.4.23, 8.1.11.
CVE-2026-121373 at a Glance
How to Fix CVE-2026-121373
To remediate this vulnerability, upgrade all affected Symfony dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade symfony/html-sanitizer to 6.4.50
Upgrade symfony/html-sanitizer to 7.4.23
Upgrade symfony/html-sanitizer to 8.1.11
Upgrade symfony/symfony to 6.4.50
Upgrade symfony/symfony to 7.4.23
Upgrade symfony/symfony to 8.1.11
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for symfony/html-sanitizer
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-121373, inspect your project dependencies for Symfony:
inspect dependencies for symfony/html-sanitizer
Analyze the terminal output to locate any version of Symfony in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.4.50), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-186: Overly Restrictive Regular Expression, where a regular expression is overly restrictive, which prevents dangerous values from being detected. In Symfony, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-121373 Affected Symfony Versions
6 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
symfony/html-sanitizer
|
Packagist |
≥ 6.1.0
< 6.4.50
|
6.4.50
|
|
symfony/html-sanitizer
|
Packagist |
≥ 7.0.0
< 7.4.23
|
7.4.23
|
|
symfony/html-sanitizer
|
Packagist |
≥ 8.0.0
< 8.1.11
|
8.1.11
|
|
symfony/symfony
|
Packagist |
≥ 6.1.0
< 6.4.50
|
6.4.50
|
|
symfony/symfony
|
Packagist |
≥ 7.0.0
< 7.4.23
|
7.4.23
|
|
symfony/symfony
|
Packagist |
≥ 8.0.0
< 8.1.11
|
8.1.11
|
References
Frequently Asked Questions
What is CVE-2026-121373?
Which Symfony versions are affected?
What version fixes CVE-2026-121373?
Is symfony/html-sanitizer affected?
Is symfony/symfony affected?
What CWE is associated with CVE-2026-121373?
How can I check Packagist dependencies for CVE-2026-121373?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-wm2w-4mgj-vw33",
"modified" : "2026-12-01T21:30:05Z",
"published" : "2026-12-01T21:30:04Z",
"aliases" : [ "CVE-2026-121373" ],
"summary" : "Symfony: HtmlSanitizer MetaRefreshAttributeSanitizer Matches Only a Narrow Subset of the Browser Refresh Grammar: Incomplete Fix for CVE-2026-48761",
"details" : "### 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 `=` 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.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/html-sanitizer"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "6.1.0"
}, {
"fixed" : "6.4.50"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/html-sanitizer"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "7.0.0"
}, {
"fixed" : "7.4.23"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/html-sanitizer"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "8.0.0"
}, {
"fixed" : "8.1.11"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "6.1.0"
}, {
"fixed" : "6.4.50"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "7.0.0"
}, {
"fixed" : "7.4.23"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "8.0.0"
}, {
"fixed" : "8.1.11"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/symfony/symfony/security/advisories/GHSA-wm2w-4mgj-vw33"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-121373"
}, {
"type" : "WEB",
"url" : "https://github.com/symfony/symfony/commit/2d4c4fe36200858b91132a95076fff3d9de89d26"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/html-sanitizer/CVE-2026-121373.yaml"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2026-121373.yaml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/symfony/symfony"
}, {
"type" : "WEB",
"url" : "https://github.com/symfony/symfony/releases/tag/v6.4.50"
}, {
"type" : "WEB",
"url" : "https://github.com/symfony/symfony/releases/tag/v7.4.23"
}, {
"type" : "WEB",
"url" : "https://github.com/symfony/symfony/releases/tag/v8.1.11"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-186", "CWE-601" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-12-01T21:30:04Z",
"nvd_published_at" : "2026-11-04T13:17:27Z"
}
}