CVE-2026-124493

SunEditor before 3.4.0 Stored XSS via DocumentType Header textContent

Published Nov 8, 2026 CVSS 4.0 · 9.3 Critical EPSS < 1% KEV · Not listed
Description
SunEditor before 3.4.0 contains a stored cross-site scripting vulnerability in the DocumentType constructor that injects header textContent into innerHTML without HTML escaping. Attackers can store entity-encoded HTML in h1-h6 headers that executes JavaScript when editors using document:header mode initialize, enabling session cookie theft.

Analysis

AI-generated

Technical impact

The vulnerability in SunEditor versions before 3.4.0 allows injected header content to be stored and later rendered as raw HTML. When the editor is initialized in document:header mode, the malicious content is set as innerHTML without proper escaping, allowing attackers to inject JavaScript. This stored XSS can steal session cookies and potentially authenticate the user.

Affected Systems

The flaw affects all versions of SunEditor released by JiHong88 prior to 3.4.0. Any deployment that permits user‑defined header elements (h1‑h6) via the editor’s DocumentType feature is vulnerable. The issue is present in any environment that loads the editor in document:header mode.

Risk and Exploitability

The CVSS score of 9.3 classifies the defect as critical. Though the EPSS is not available, the lack of a KEV listing does not diminish the risk. Exploitation requires the attacker to supply header content; thus the attack vector is likely a trusted user or an insider who can input menu. Once exploited, the attacker can execute arbitrary JavaScript in the context of the editor, read cookies, and hijack the session. Mitigation must involve upgrading the library or escaping header textContent.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade SunEditor to 3.4.0 or newer, as the release applies the necessary escaping to header textContent.
  • Disable the document:header mode or remove the ability for users to input custom header content if an immediate upgrade is not possible.
  • Ensure that any header textContent is HTML‑escaped before assigning it to innerHTML; consider implementing a strict CSP that blocks inline script execution.

Generated by OpenCVE AI on November 8, 2026 at 14:35 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Jihong88
Jihong88 suneditor
Vendors & Products Jihong88
Jihong88 suneditor
Type Values Removed Values Added
Description SunEditor before 3.4.0 contains a stored cross-site scripting vulnerability in the DocumentType constructor that injects header textContent into innerHTML without HTML escaping. Attackers can store entity-encoded HTML in h1-h6 headers that executes JavaScript when editors using document:header mode initialize, enabling session cookie theft.
Title SunEditor before 3.4.0 Stored XSS via DocumentType Header textContent
Weaknesses CWE-79
References
Metrics cvssV4_0

{'score': 9.3, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:N/SC:H/SI:H/SA:N'}

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Nov 12, 2026, 2:12 PM
Reserved
Nov 8, 2026, 2:21 AM
Status
Awaiting Analysis
Published
Nov 8, 2026, 2:18 PM
Modified
Nov 12, 2026, 8:28 PM