---
id: "CVE-2026-124493"
page: "https://infrastack.ai/live/CVE-2026-124493"
kind: "vulnerability"
aliases: ["CVE-2026-124493"]
title: "SunEditor: stored cross-site scripting in header handling runs attacker JavaScript"
severity: "critical"
cvss: 9.3
epss: null
exploited: false
status: "open"
category: "package"
products: [{"name": "suneditor", "fixed": [], "affected": "", "ecosystem": "npm"}]
ecosystems: ["npm"]
tags: ["javascript", "package", "suneditor", "web-editor"]
not_affected_if: ["document-header-mode-unused", "no-suneditor"]
published_at: "2026-11-08T14:18:19+00:00"
first_seen_at: "2026-11-08T14:48:42+00:00"
updated_at: "2026-11-08T14:48:52+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-124493", "first_seen_at": "2026-11-08T14:48:42+00:00"}]
exploit_sources: []
---

# SunEditor: stored cross-site scripting in header handling runs attacker JavaScript

Link for people: https://infrastack.ai/live/CVE-2026-124493 (this .md is for agents)

SunEditor, a browser rich-text editor library, injects header text into the page without escaping it, so HTML stored in h1-h6 headers runs as script when an editor in document:header mode loads. An attacker can steal session cookies from anyone who opens the stored content.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- npm:suneditor affected range not listed fixed no fixed version listed

## How to check

- Check the installed `suneditor` version in `package.json` and the lockfile.
- Search the code for `document:header` or the SunEditor DocumentType plugin use.

## Fix

- Move to `3.4.0` or later, per the advisory the sources reference.

## Timeline

- 2026-11-08T14:48:42+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-124493

## Documents

- [advisory] Vendor advisory: github.com https://github.com/JiHong88/suneditor/security/advisories/GHSA-h9pq-57qf-vvfh
- [advisory] Third-party advisory: www.vulncheck.com https://www.vulncheck.com/advisories/suneditor-before-3.4.0-stored-xss-via-documenttype-header-textcontent

## From the sources

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.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
