CVE-2026-55877: symfony/ux-icons Cross-Site Scripting Vulnerability

MODERATE
Advisory Identifier: GHSA-6v8j-33hc-mv84
CVSS 6.1
CWE-79
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2026-55877
GHSA Identifier GHSA-6v8j-33hc-mv84
Severity MODERATE
CVSS v3.1 Base Score 6.1
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product symfony/ux-icons
Package Ecosystem Packagist
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (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.

symfony/ux-icons fixed: 2.36.1
Upgrade symfony/ux-icons to 2.36.1
symfony/ux-icons fixed: 3.2.0
Upgrade symfony/ux-icons to 3.2.0
Verify Direct and Transitive Dependencies

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

### Description The `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. Two 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). ### Resolution Introducing 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. `<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. ### Credits Symfony would like to thank Pascal Cescon for reporting the issue and Hugo Alliaume for providing the fix.

CVE-2026-55877 Affected symfony/ux-icons Versions

2 component(s)
Fixed Versions:
2.36.13.2.0
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?
CVE-2026-55877 is a security vulnerability in symfony/ux-icons involving XSS via unsanitized SVG content in local files and Iconify on-demand responses under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which symfony/ux-icons versions are affected?
Affected versions include releases prior to 2.36.1, 3.2.0 across affected packages: symfony/ux-icons.
What version fixes CVE-2026-55877?
Upgrading to 2.36.1, 3.2.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is symfony/ux-icons affected?
Yes, symfony/ux-icons is affected in releases prior to 2.36.1, 3.2.0. Upgrade your dependency to 2.36.1, 3.2.0 or later.
What is the CVSS score of CVE-2026-55877?
CVE-2026-55877 has a CVSS v3.1 base score of 6.1 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2026-55877?
CVE-2026-55877 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (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.).
How can I check Packagist dependencies for CVE-2026-55877?
Run the dependency tree command: 'inspect dependencies for symfony/ux-icons'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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
  }
}