GHSA-6v8j-33hc-mv84

Suggest an improvement
Source
https://github.com/advisories/GHSA-6v8j-33hc-mv84
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/06/GHSA-6v8j-33hc-mv84/GHSA-6v8j-33hc-mv84.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-6v8j-33hc-mv84
Aliases
  • CVE-2026-55877
Published
2026-06-19T21:42:15Z
Modified
2026-06-19T21:45:20.416202758Z
Severity
  • 6.1 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N CVSS Calculator
Summary
symfony/ux-icons: XSS via unsanitized SVG content in local files and Iconify on-demand responses
Details

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.

Database specific
{
    "github_reviewed": true,
    "github_reviewed_at": "2026-06-19T21:42:15Z",
    "nvd_published_at": null,
    "severity": "MODERATE",
    "cwe_ids": [
        "CWE-79"
    ]
}
References

Affected packages

Packagist / symfony/ux-icons

Package

Name
symfony/ux-icons
Purl
pkg:composer/symfony%2Fux-icons

Affected ranges

Type
ECOSYSTEM
Events
Introduced
2.17.0
Fixed
2.36.1

Affected versions

v2.*
v2.17.0
v2.18.0
v2.18.1
v2.19.0
v2.20.0
v2.21.0
v2.22.0
v2.22.1
v2.23.0
v2.24.0
v2.25.0
v2.26.0
v2.27.0
v2.28.0
v2.28.2
v2.29.0
v2.29.2
v2.30.0
v2.31.0
v2.32.0
v2.33.0
v2.34.0
v2.35.0
v2.36.0

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/06/GHSA-6v8j-33hc-mv84/GHSA-6v8j-33hc-mv84.json"

Packagist / symfony/ux-icons

Package

Name
symfony/ux-icons
Purl
pkg:composer/symfony%2Fux-icons

Affected ranges

Type
ECOSYSTEM
Events
Introduced
3.0.0
Fixed
3.2.0

Affected versions

v3.*
v3.0.0
v3.1.0

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/06/GHSA-6v8j-33hc-mv84/GHSA-6v8j-33hc-mv84.json"