Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. symfony/ux-icons
  4. ›
  5. CVE-2026-55877

CVE-2026-55877: symfony/ux-icons: XSS via unsanitized SVG content in local files and Iconify on-demand responses

June 19, 2026

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

References

  • github.com/FriendsOfPHP/security-advisories/blob/master/symfony/ux-icons/CVE-2026-55877.yaml
  • github.com/advisories/GHSA-6v8j-33hc-mv84
  • github.com/symfony/ux/security/advisories/GHSA-6v8j-33hc-mv84
  • nvd.nist.gov/vuln/detail/CVE-2026-55877

Code Behaviors & Features

Detect and mitigate CVE-2026-55877 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 2.17.0 before 2.36.1, all versions starting from 3.0.0 before 3.2.0

Fixed versions

  • 2.36.1
  • 3.2.0

Solution

Upgrade to versions 2.36.1, 3.2.0 or above.

Impact 6.1 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

packagist/symfony/ux-icons/CVE-2026-55877.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 23 Jun 2026 12:23:50 +0000.