CVE-2026-55877: symfony/ux-icons Cross-Site Scripting Vulnerability
MODERATECVE-2026-55877 is a MODERATE (CVSS 6.1) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting symfony/ux-icons libraries in the Packagist ecosystem. The issue involves xss via unsanitized svg content in local files and iconify on-demand responses. Remediation is available by upgrading affected packages to version 2.36.1, 3.2.0.
CVE-2026-55877 at a Glance
Security Impact
CVSS: 6.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N).
How to Fix CVE-2026-55877
To remediate this vulnerability, upgrade all affected symfony/ux-icons 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/ux-icons to 2.36.1
Upgrade symfony/ux-icons to 3.2.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for symfony/ux-icons
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-55877, inspect your project dependencies for symfony/ux-icons:
inspect dependencies for symfony/ux-icons
Analyze the terminal output to locate any version of symfony/ux-icons in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.36.1), 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/ux-icons, 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-55877 Affected symfony/ux-icons Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
symfony/ux-icons
|
Packagist |
≥ 2.17.0
< 2.36.1
|
2.36.1
|
|
symfony/ux-icons
|
Packagist |
≥ 3.0.0
< 3.2.0
|
3.2.0
|
References
Frequently Asked Questions
What is CVE-2026-55877?
Which symfony/ux-icons versions are affected?
What version fixes CVE-2026-55877?
Is symfony/ux-icons affected?
What is the CVSS score of CVE-2026-55877?
What CWE is associated with CVE-2026-55877?
How can I check Packagist dependencies for CVE-2026-55877?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6v8j-33hc-mv84",
"modified" : "2026-06-19T21:42:15Z",
"published" : "2026-06-19T21:42:15Z",
"aliases" : [ "CVE-2026-55877" ],
"summary" : "symfony/ux-icons: XSS via unsanitized SVG content in local files and Iconify on-demand responses",
"details" : "### Description\n\nThe `ux_icon()` Twig function is marked `is_safe=['html']`, so Twig never escapes its output. `Icon::toHtml()` inlines the SVG source verbatim into the page. Browsers execute `<script>` elements and `on*` event-handler attributes found inside inline SVG, making any unsanitized icon a vector for cross-site scripting.\n\nTwo code paths were affected. In the local file path, `Icon::fromFile()` only stripped `<script>` elements that were direct children of `<svg>`, leaving nested scripts and all `on*` attributes untouched despite a code comment claiming broader protection. In the Iconify on-demand path (enabled by default), the remote JSON `body` field was wrapped into an `Icon` object with no sanitization at all. Concrete attack vectors include a malicious SVG icon pack from a third-party theme or downloaded icon set, or a controlled Iconify endpoint configured via `iconify.endpoint` (including a poisoned cache).\n\n### Resolution\n\nIntroducing an `IconFactory` that centralizes sanitization across every icon source before an `Icon` object is created. The sanitizer removes script-capable elements (`script`, `foreignObject`, `iframe`, `object`, `embed`), SMIL animations targeting `on*`, `href`, or `xlink:href` attributes, CDATA sections, processing instructions, all `on*` attributes, and `javascript:`, `vbscript:`, and `data:text/html` URL schemes. \n`<style>` elements are kept for theming but have any handlers stripped. Icons that contain none of these constructs are byte-for-byte identical after sanitization. \n\n### Credits\n\nSymfony would like to thank Pascal Cescon for reporting the issue and Hugo Alliaume for providing the fix.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/ux-icons"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.17.0"
}, {
"fixed" : "2.36.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/ux-icons"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.0"
}, {
"fixed" : "3.2.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/symfony/ux/security/advisories/GHSA-6v8j-33hc-mv84"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/ux-icons/CVE-2026-55877.yaml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/symfony/ux"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-06-19T21:42:15Z",
"nvd_published_at" : null
}
}