/

CVE-2026-28426

Severity:

HIGH RISK

(8.7)

Stored XSS in Statamic SVG and Icon Components

CVE-2026-28426

Analyzed

Vulnerability type

Category:

Stored Cross-Site Scripting (XSS)

CWE:

CWE-79

Impact:

Privilege Escalation and Account Compromise via Stored XSS

Severity:

HIGH RISK

(8.7)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Statamic contained a stored cross-site scripting vulnerability where SVG and icon-related components allowed untrusted content to be rendered as executable JavaScript in the browser.

Authenticated users with specific content or design permissions could inject malicious scripts that later execute when higher-privileged users view affected pages or admin interfaces, potentially compromising their accounts and actions.

Affected context

The vulnerability occurs in Statamic deployments where:

  • SVG or icon-related components can be created, edited, or uploaded by authenticated users, and
  • The CMS renders these components in admin or front-end views without sufficient HTML/JS sanitization or contextual encoding.

It is most relevant in multi-user environments where lower-privileged editors or designers can influence assets or templates that are later viewed by administrators or other privileged roles.

Exploit preconditions

  • Attack surface: Web-based Statamic admin panel and any front-end pages rendering the affected SVG/icon components.
  • Required access: Authenticated access with permissions to create or modify SVG/icon-related content, templates, or assets.
  • Trigger point: A privileged user (e.g., admin, content manager) visits a page or panel where the malicious SVG/icon component is rendered in the browser.
  • Why exploitation is possible: User-controlled data is inserted into HTML/SVG contexts and interpreted by the browser without proper escaping, sanitization, or CSP controls, allowing embedded script execution.

Why this happens

This issue stems from insufficient output encoding and sanitization of user-provided data rendered inside SVG and icon-related components.

When arbitrary SVG markup or attributes are accepted and output directly into the DOM, browsers may interpret script-capable constructs such as event handlers, JavaScript URLs, or other active content.

This aligns with CWE-79: Improper Neutralization of Input During Web Page Generation (Cross-site Scripting), where untrusted content is incorporated into a web page without appropriate context-aware escaping or filtering.

Potential impact

  • Malicious JavaScript can execute in the context of a privileged user's browser session.
  • Attackers may hijack administrator sessions or perform actions on their behalf (e.g., content changes, configuration modifications).
  • Theft of sensitive data accessible in the admin interface, such as API keys, tokens, or user information.
  • Creation of persistent backdoors in templates or assets for long-term compromise.
  • Lateral movement by altering permissions, adding new privileged accounts, or modifying site configuration.

General mitigation guidance

Effective mitigation centers on strict separation between data and executable content within SVG/icon rendering paths:

  • Apply robust, server-side sanitization to any SVG or icon markup originating from users, removing scripts, event handlers, and unsafe URL schemes.
  • Use context-aware output encoding whenever user-controlled data is written into HTML, attribute, or JavaScript contexts.
  • Prefer whitelisting approaches (e.g., only allowing a safe subset of SVG elements and attributes) over blacklisting specific dangerous constructs.
  • Restrict which roles can upload or edit SVG/icon assets and templates, particularly those that are rendered in higher-privilege interfaces.
  • Consider defense-in-depth with browser-side controls such as a strict Content Security Policy that disallows inline scripts and unsafe eval-like features.

How teams detect issues like this

Organizations can detect and manage this class of issues through:

  • Static analysis rules or linters that flag unsanitized HTML/SVG output or direct rendering of user-generated markup.
  • Targeted code review focusing on template helpers, view components, and asset pipelines that output SVG/icon content.
  • Security tests and automated scanners configured with authenticated accounts to probe for stored XSS via asset uploads and content fields.
  • Logging and monitoring of admin panel activity for anomalous behavior that may indicate session hijacking or scripted actions.

Sources

SourceLink
github.comgithub.com/statamic/cms/releases/tag/v5.73.11
github.comgithub.com/statamic/cms/releases/tag/v6.4.0
github.comgithub.com/statamic/cms/security/advisories/GHSA-5vrj-wf7v-5wr7

Frequently asked

questions

Yes, but it requires an attacker to have authenticated access with appropriate permissions. Once malicious content is stored, any privileged user who loads the affected page in a browser may trigger the exploit remotely.

No. The issue specifically arises when lower-privileged users (such as editors or designers) can create or modify SVG/icon components that are subsequently viewed by higher-privileged accounts like administrators.

The most robust fix is to ensure all user-controlled content rendered in HTML/SVG is properly sanitized and contextually encoded, combined with strict whitelisting of allowed elements and attributes for SVG/icon content and limiting executable constructs altogether.

Adopt a secure templating and rendering strategy that treats all user input as untrusted by default, enforce centralized sanitization and encoding libraries for all output contexts, gate risky asset types (like raw SVG) behind stricter permissions, and incorporate security reviews and automated checks into the development and deployment pipeline.

Find out what's already
exploitable in your codebase.