Loading advisory.
Loading advisory.
Symfony's HtmlSanitizer UrlAttributeSanitizer Omits action/formaction/poster/cite — `javascript`: URI Survives Sanitization (XSS)
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.
Published 2026-05-28 16:43 UTC · Modified 2026-09-10 03:51 UTC
Severity and EPSS are shown separately. Helm does not combine them into one score. How tiers work
| Package | Ecosystem | Affected | Fixed in | Upgrade command |
|---|---|---|---|---|
| symfony/html-sanitizer | Packagist | >= 6.1.0, < 6.4.40 >= 7.0.0, < 7.4.12 >= 8.0.0, < 8.0.12 versions v6.1.0, v6.1.11, v6.1.9, v6.2.0, v6.2.0-BETA1, v6.2.0-RC1, v6.2.2, v6.2.5, v6.2.7, v6.3.0, v6.3.0-BETA1, v6.3.0-RC1, v6.3.12, v6.3.4, v6.3.7, v6.4.0, v6.4.0-BETA1, v6.4.0-BETA2, v6.4.0-RC1, v6.4.12 and 47 more | 6.4.40, 7.4.12, 8.0.12 | composer require 'symfony/html-sanitizer:>=6.4.40'composer require 'symfony/html-sanitizer:>=7.4.12'composer require 'symfony/html-sanitizer:>=8.0.12' |
| symfony/symfony | Packagist | >= 6.1.0, < 6.4.40 >= 7.0.0, < 7.4.12 >= 8.0.0, < 8.0.12 versions v6.1.0, v6.1.1, v6.1.10, v6.1.11, v6.1.12, v6.1.2, v6.1.3, v6.1.4, v6.1.5, v6.1.6, v6.1.7, v6.1.8, v6.1.9, v6.2.0, v6.2.0-BETA1, v6.2.0-BETA2, v6.2.0-BETA3, v6.2.0-RC1, v6.2.0-RC2, v6.2.1 and 158 more | 6.4.40, 7.4.12, 8.0.12 | composer require 'symfony/symfony:>=6.4.40'composer require 'symfony/symfony:>=7.4.12'composer require 'symfony/symfony:>=8.0.12' |
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.
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.
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:
<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");
<button> / <input type=image> + formaction: allowElement(…, '*'), allowAttribute('formaction', …), or allowStaticElements();
<blockquote> / <q> / <del> / <ins> + cite, or <video> + poster: similarly via '*', allowAttribute(), or allowStaticElements().
For the action / formaction cases the victim must additionally submit the form or click the button.
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.
One 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.
The patch for this issue is available here for branch 6.4.
Symfony would like to thank Himanshu Anand and Rémi Pelloux for reporting the issue and Nicolas Grekas for providing the fix.
No public exploit code known to Helm's sources (Nuclei templates, Metasploit, Exploit-DB and PoC-in-GitHub). That does not mean none exists.
EPSS went from 0.003 on 2026-11-24 to 0.003 on 2026-11-26, over 2 recorded scores.
| Date | Score | Previous | Model |
|---|---|---|---|
| 2026-11-24 | 0.003 | first score | v2026.06.15 |
| 2026-11-26 | 0.003 | 0.003 | v2026.06.15 |