# CVE-2026-54606: SunEditor: DOM XSS in SunEditor Embed Plugin via External Script Element After Iframe Embed

> An attacker can execute arbitrary JavaScript in the victim's browser by injecting a malicious script element into the SunEditor Embed plugin, leading to potential account takeover.

- **Severity:** High 8.5 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 26 Aug 2026
- **Updated:** 26 Aug 2026
- **Also known as:** GHSA-w93q-cq9w-58p7

## What is CVE-2026-54606?

CVE-2026-54606 is a high-severity cross-site scripting vulnerability in JiHong88 suneditor, published on 26 Aug 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

### Official description

SunEditor is a lightweight and powerful WYSIWYG editor in vanilla JavaScript with no dependencies. Prior to 3.1.4, the SunEditor Embed plugin in src/plugins/modal/embed.js parses attacker-controlled raw embed HTML with DOMParser and processes the resulting DOM nodes. When an external script element follows a valid iframe, the plugin recreates a script element from the attacker-controlled src attribute and appends it to the live DOM, causing JavaScript execution in the editor page. If an application stores or reflects SunEditor content without additional backend sanitization, an attacker who can submit embed HTML can trigger stored or reflected cross-site scripting when another user opens, previews, renders, or edits the content, enabling access to page data and account actions as the victim. This issue is fixed in version 3.1.4.

Weakness: CWE-79 (Improper Neutralization of Input During Web Page Generation)

## Which versions are affected by CVE-2026-54606?

2 open source packages ship an affected version, including suneditor.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `suneditor` | npm | All versions | 3.1.4 |
| `suneditor` | npm | All versions | 3.1.4 |

## How do I fix CVE-2026-54606?

Upgrade suneditor to 3.1.4 or later.

## Is CVE-2026-54606 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-54606 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-54606 and fix it if it is affected.

What it is: CVE-2026-54606 is a high-severity cross-site scripting vulnerability in JiHong88 suneditor, published on 26 Aug 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-54606 exists.

Affected packages and fixed versions:
- suneditor (npm): affected all versions; fixed in 3.1.4
- suneditor (npm): affected all versions; fixed in 3.1.4

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-54606/ (Markdown: https://insights.sbomify.com/CVE-2026-54606/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-54606
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-54606
- OSV: https://osv.dev/vulnerability/CVE-2026-54606

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-54606/
Summaries are generated and may contain mistakes; the official description above is the record.
