CVE-2026-45753: Symfony/html sanitizer Cross-Site Scripting Vulnerability
LOWCVE-2026-45753 is a LOW cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Symfony/html sanitizer libraries in the Packagist ecosystem. The issue involves uri survives sanitization (xss). Remediation is available by upgrading affected packages to version 6.4.40, 7.4.12, 8.0.12.
CVE-2026-45753 at a Glance
How to Fix CVE-2026-45753
To remediate this vulnerability, upgrade all affected Symfony/html sanitizer 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.40
Upgrade symfony/html-sanitizer to 7.4.12
Upgrade symfony/html-sanitizer to 8.0.12
Upgrade symfony/symfony to 6.4.40
Upgrade symfony/symfony to 7.4.12
Upgrade symfony/symfony to 8.0.12
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-45753, inspect your project dependencies for Symfony/html sanitizer:
inspect dependencies for symfony/html-sanitizer
Analyze the terminal output to locate any version of Symfony/html sanitizer in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.4.40), 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-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Symfony/html sanitizer, 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-45753 Affected Symfony/html sanitizer Versions
6 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
symfony/html-sanitizer
|
Packagist |
≥ 6.1.0
< 6.4.40
|
6.4.40
|
|
symfony/html-sanitizer
|
Packagist |
≥ 7.0.0
< 7.4.12
|
7.4.12
|
|
symfony/html-sanitizer
|
Packagist |
≥ 8.0.0
< 8.0.12
|
8.0.12
|
|
symfony/symfony
|
Packagist |
≥ 6.1.0
< 6.4.40
|
6.4.40
|
|
symfony/symfony
|
Packagist |
≥ 7.0.0
< 7.4.12
|
7.4.12
|
|
symfony/symfony
|
Packagist |
≥ 8.0.0
< 8.0.12
|
8.0.12
|
References
Frequently Asked Questions
What is CVE-2026-45753?
Which Symfony/html sanitizer versions are affected?
What version fixes CVE-2026-45753?
Is symfony/html-sanitizer affected?
Is symfony/symfony affected?
What CWE is associated with CVE-2026-45753?
How can I check Packagist dependencies for CVE-2026-45753?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-hhg7-c65m-h7ff",
"modified" : "2026-05-28T16:43:28Z",
"published" : "2026-05-28T16:43:27Z",
"aliases" : [ "CVE-2026-45753" ],
"summary" : "Symfony's HtmlSanitizer UrlAttributeSanitizer Omits action/formaction/poster/cite — `javascript`: URI Survives Sanitization (XSS)",
"details" : "### Description\n\n`symfony/html-sanitizer` lets applications sanitise untrusted HTML. `UrlAttributeSanitizer` is the visitor responsible for validating URL-valued attributes and stripping dangerous schemes from them; it runs on every element regardless of configuration. Whether an attribute is *kept* is decided by the element/attribute allow-list; validating the *scheme* of a URL attribute is solely `UrlAttributeSanitizer`'s responsibility.\n\n`UrlAttributeSanitizer::getSupportedAttributes()` returned only `['src', 'href', 'lowsrc', 'background', 'ping']`. The HTML URL-valued attributes `action` (`<form>`), `formaction` (`<button>`, `<input type=image>`), `poster` (`<video>`) and `cite` (`<blockquote>`, `<q>`, `<del>`, `<ins>`) were missing from that list, so `DomVisitor` never invoked scheme validation for them. As a result, when a configuration admits one of those attributes, a `javascript:` URI in it survived sanitisation.\n\n### Conditions for exploitation\n\n`allowSafeElements()` is **not** affected: `<form>` and the `formaction` attribute are both flagged unsafe in `W3CReference`, and `allowElement('form')` resets the element's attribute list. Reaching the vulnerable attributes requires a deliberately permissive configuration, for example:\n\n* `<form>` + `action`: `allowElement('form', '*')`, `allowElement('form', ['action', …])`, `allowElement('form')->allowAttribute('action', 'form')`, or the `allowStaticElements()` preset (whose docblock already warns the output \"may still contain other dangerous behaviors\");\n* `<button>` / `<input type=image>` + `formaction`: `allowElement(…, '*')`, `allowAttribute('formaction', …)`, or `allowStaticElements()`;\n* `<blockquote>` / `<q>` / `<del>` / `<ins>` + `cite`, or `<video>` + `poster`: similarly via `'*'`, `allowAttribute()`, or `allowStaticElements()`.\n\nFor the `action` / `formaction` cases the victim must additionally submit the form or click the button.\n\n### Resolution\n\n`UrlAttributeSanitizer` now also handles `action`, `formaction`, `cite` and `poster`. `action` / `formaction` / `cite` are validated against the link schemes (like `<a href>`, so `javascript:` is rejected and `data:` is dropped too); `poster` is validated against the media schemes (so `data:` images keep working). The behaviour of `<a href>` and `<img src>` is unchanged.\n\nOne behaviour change to be aware of: a relative `action=\"/submit\"` on an allowed `<form>` is now dropped by default (the same as `<a href>` / `<img src>` today); `->allowRelativeLinks()` re-enables it.\n\nThe patch for this issue is available [here](https://github.com/symfony/symfony/commit/26a598fcfc4f903cc55ff202f642ee621839825e) for branch 6.4.\n\n### Credits\n\nSymfony would like to thank Himanshu Anand and Rémi Pelloux for reporting the issue and Nicolas Grekas for providing the fix.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:U"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/html-sanitizer"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "6.1.0"
}, {
"fixed" : "6.4.40"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/html-sanitizer"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "7.0.0"
}, {
"fixed" : "7.4.12"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/html-sanitizer"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "8.0.0"
}, {
"fixed" : "8.0.12"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "6.1.0"
}, {
"fixed" : "6.4.40"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "7.0.0"
}, {
"fixed" : "7.4.12"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "8.0.0"
}, {
"fixed" : "8.0.12"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/symfony/symfony/security/advisories/GHSA-hhg7-c65m-h7ff"
}, {
"type" : "WEB",
"url" : "https://github.com/symfony/symfony/commit/26a598fcfc4f903cc55ff202f642ee621839825e"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/html-sanitizer/CVE-2026-45753.yaml"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2026-45753.yaml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/symfony/symfony"
}, {
"type" : "WEB",
"url" : "https://symfony.com/cve-2026-45753"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-184", "CWE-79" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2026-05-28T16:43:27Z",
"nvd_published_at" : null
}
}