/

CVE-2026-90561

Severity:

HIGH RISK

(8.7)

Stored XSS (CWE-79) in Strapi WYSIWYG Preview Component

CVE-2026-90561

Awaiting Analysis

Vulnerability type

Category:

Stored Cross-Site Scripting

CWE:

CWE-79

Impact:

Session Hijacking and Account Takeover

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

Strapi contains a stored cross-site scripting vulnerability in the content manager's WYSIWYG preview component, which may fail to remove script tags from rich text content. An Author-role user could store malicious content that executes in an Editor or Super Admin's browser session when the preview pane is expanded, potentially enabling account takeover.

Affected context

The vulnerability occurs in Strapi content management deployments that use affected 4.x or 5.x releases and expose the WYSIWYG preview for rich text fields. Risk depends on an Author-role user being able to submit or save rich text that is later rendered in a higher-privileged user's authenticated management session.

Exploit preconditions

  • Attack surface: Strapi content manager WYSIWYG preview component
  • Required access: Author-role access sufficient to create or modify rich text content
  • Trigger point: An Editor or Super Admin expands the preview pane containing the stored content
  • Why exploitation is possible: Script elements are not consistently removed or neutralized before the rich text is rendered in the privileged management interface

Why this happens

The underlying issue is insufficient output encoding or sanitization of user-controlled rich text before it is rendered as HTML in the administrative interface. When script-capable markup is preserved and interpreted by the browser, attacker-controlled content executes in the security context of the viewing user. This behavior maps to CWE-79: Improper Neutralization of Input During Web Page Generation, commonly known as cross-site scripting.

Potential impact

  • An attacker may execute JavaScript in an Editor's or Super Admin's browser session
  • Session data or sensitive administrative information could be exposed
  • Administrative actions could be performed on behalf of a targeted user
  • A privileged account may be compromised or taken over
  • Malicious content could be propagated through managed entries or workflows

General mitigation guidance

Mitigation generally focuses on treating all author-supplied rich text as untrusted and ensuring it cannot execute active browser content.

Common defensive patterns include:

  • Applying context-aware HTML sanitization with an allowlist of required elements and attributes
  • Encoding or safely rendering rich text before inserting it into the DOM
  • Removing script-capable tags, event-handler attributes, unsafe URLs, and other active content
  • Enforcing consistent sanitization at both content ingestion and preview-rendering boundaries
  • Limiting Author permissions to the content operations they need
  • Using browser security policies, such as an appropriately restrictive Content Security Policy, as defense in depth
  • Avoiding privileged sessions for untrusted preview content where practical

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis of rich text rendering paths for unsafe HTML insertion or direct DOM APIs
  • Code review checks for missing sanitization, weak allowlists, and inconsistent preview handling
  • Tests that verify script tags, event attributes, unsafe URI schemes, and malformed HTML are neutralized
  • Dynamic security testing of content fields and preview panes using non-destructive XSS test cases
  • Content governance policies that restrict who can submit markup and require review before publication
  • Automated code and dependency review tools that flag common cross-site scripting patterns

Sources

SourceLink
github.comgithub.com/strapi/strapi
github.comgithub.com/strapi/strapi/blob/v5.46.0/packages/core/content-manager/admin/src/pages/EditView/components/FormInputs/Wysiwyg/PreviewWysiwyg.tsx
github.comgithub.com/strapi/strapi/commit/875752612c30f951546904a29469e51e17e0ac37
github.comgithub.com/strapi/strapi/issues/26857
vulncheck.comvulncheck.com/advisories/strapi-4-x-through-4.26.2-and-5-x-before-5.48.1-stored-xss-via-wysiwyg

Frequently asked

questions

Typically, exploitation requires authenticated Author-role access to store or modify rich text. The stored content must then be viewed through the affected preview component by a user with a more privileged session.

The preview renders attacker-controlled rich text while failing to sufficiently remove or neutralize script-capable markup. The browser then interprets the content in the context of the Strapi management interface.

Treat rich text as untrusted input, apply strict allowlist-based sanitization, and use safe context-aware rendering and output encoding wherever content is displayed.

Combine secure rendering libraries, focused authorization, automated tests for active HTML content, code review of all preview paths, and defense-in-depth browser policies such as Content Security Policy.

Find out what's already
exploitable in your codebase.