CVE-2026-59167

SunEditor <= 2.47.10 Sanitizer Bypass XSS (CVE-2026-59167)

Initial Access Last updated:

Detects exploitation attempts and vulnerable-component presence for CVE-2026-59167, a critical (CVSS 10.0) cross-site scripting (CWE-79) vulnerability in the SunEditor npm rich-text WYSIWYG editor at versions <= 2.47.10. A flaw in SunEditor's HTML sanitizer allows attacker-controlled markup (crafted event-handler attributes, obfuscated javascript: URIs, malformed tags, and mutation-XSS payloads) to bypass filtering and execute arbitrary JavaScript in the victim's browser context. Because SunEditor content is frequently stored and re-rendered, exploitation can result in stored XSS, session/token theft, and account takeover. Detection focuses on web-request payloads carrying XSS vectors targeting SunEditor endpoints, dangerous sanitizer-bypass patterns in stored content, and inventory of vulnerable suneditor package versions in build/deploy telemetry.

Vulnerability Intelligence

Public PoC

What is CVE-2026-59167 SunEditor <= 2.47.10 Sanitizer Bypass XSS (CVE-2026-59167)?

SunEditor <= 2.47.10 Sanitizer Bypass XSS (CVE-2026-59167) (CVE-2026-59167) maps to the Initial Access tactic — the adversary is trying to get into your network in MITRE ATT&CK.

This page provides production-ready detection logic for SunEditor <= 2.47.10 Sanitizer Bypass XSS (CVE-2026-59167), covering the data sources and telemetry it touches: Azure App Service HTTP logs, IIS W3C logs, WAF logs. The queries below are rated critical severity at medium confidence, and ship for 7 SIEM platforms — KQL, SPL, Elastic, QRadar, Sumo, YARA-L, LogScale.

MITRE ATT&CK

Tactic
Initial Access
Microsoft Sentinel / Defender
kusto
let xssPatterns = dynamic(["onerror=","onload=","onmouseover=","onfocus=","onpointer","javascript:","<script","<svg","<img","srcdoc=","formaction=","data:text/html","<iframe","onanimationstart"]);
union isfuzzy=true
(
AppServiceHTTPLogs
| extend RawUri = tostring(CsUriStem), Query = tostring(CsUriQuery), UA = tostring(UserAgent)
),
(
W3CIISLog
| extend RawUri = tostring(csUriStem), Query = tostring(csUriQuery), UA = tostring(csUserAgent)
)
| extend Decoded = tolower(url_decode(strcat(RawUri, "?", Query)))
| where Decoded has_any ("suneditor","se-wrapper","sun-editor-editable","/editor","/post","/comment","/content")
| where Decoded has_any (xssPatterns)
| project TimeGenerated, RawUri, Query, UA, Decoded
| sort by TimeGenerated desc

Flags HTTP requests to editor/content endpoints that carry SunEditor identifiers together with XSS sanitizer-bypass tokens, indicating attempted exploitation of CVE-2026-59167 via IIS/App Service web logs.

critical severity medium confidence

Data Sources

Azure App Service HTTP logs IIS W3C logs WAF logs

Required Tables

AppServiceHTTPLogs W3CIISLog

False Positives

  • Security scanners and DAST tools (Burp, OWASP ZAP, Nessus) probing editor fields with benign XSS strings
  • Legitimate documentation or CMS pages that discuss XSS payloads as content
  • Penetration test engagements against the SunEditor-backed application

Sigma rule & cross-platform mapping

The detection logic for SunEditor <= 2.47.10 Sanitizer Bypass XSS (CVE-2026-59167) (CVE-2026-59167) above is provided in a vendor-neutral form so you can deploy it on any SIEM. The same logic is shipped here as native KQL (Microsoft Sentinel / Defender), SPL (Splunk), Elastic (Elastic Security (EQL)), QRadar (IBM QRadar (AQL)), Sumo (Sumo Logic CSE), YARA-L (Google Chronicle / SecOps), LogScale (CrowdStrike LogScale (CQL)) queries. In Sigma terms, this detection targets the following logsource:

logsource:
  product: azure

Browse the community-maintained Sigma rules for this technique:


Testing Methodology

Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1SunEditor onerror handler injection

    Expected signal: Web access log entry to /editor/save containing onerror= and an img tag targeting a SunEditor route.

  2. Test 2SunEditor SVG/animation mXSS payload

    Expected signal: HTTP request to /comment with url-encoded <svg ... onanimationstart= payload.

  3. Test 3Vulnerable suneditor package install detection

    Expected signal: Process/command-line event showing npm install [email protected] and package.json version 2.47.10.


Response Playbook

Triage

  1. Confirm the affected application embeds SunEditor and determine the installed version via package-lock.json / node_modules/suneditor/package.json; anything <= 2.47.10 is vulnerable.
  2. Decode the flagged request payload and determine whether it is a live exploit attempt (weaponized handler/JS execution) versus a benign scanner or content string.
  3. Identify the target endpoint (comment, post, profile, article body) and whether SunEditor output is persisted and re-rendered to other users, indicating stored XSS blast radius.
  4. Check whether the payload executed by correlating with browser/CSP violation reports or downstream anomalous authenticated sessions from victim accounts.

Containment

  1. Upgrade SunEditor to 2.47.11 (or later) which fixes the sanitizer bypass, and redeploy the affected application.
  2. As an interim mitigation, enforce a strict Content-Security-Policy (no unsafe-inline, no inline event handlers) and add server-side output sanitization (DOMPurify) on all stored SunEditor content, plus a WAF rule blocking the XSS bypass tokens.
  3. Quarantine and re-sanitize any stored content records created during the exposure window to remove persisted payloads.

Evidence Collection

  1. Preserve raw web/WAF access logs containing the payload, including full request body, headers, source IP and user-agent.
  2. Export the stored database records (content fields) containing suspected injected markup with created/modified timestamps and author identity.
  3. Capture the deployed SunEditor version artifacts (package-lock.json, bundled JS hashes) proving the vulnerable version was in production.

Escalation Criteria

  • ! Escalate to incident response if stored payloads were served to other authenticated users or if session/token theft or account takeover is observed.
  • ! Escalate to application owners and change management to expedite the 2.47.11 upgrade if the vulnerable component is confirmed in a customer-facing production system.

Investigation Guide

Forensic Artifacts

  • > Web server / WAF access logs with the encoded payload
  • > Application database content fields holding persisted markup
  • > Deployed suneditor package version in node_modules / package-lock.json
  • > CSP violation reports and browser error telemetry
  • > Outbound requests to attacker collection endpoints originating from victim sessions

Tuning Guidance

Baseline known DAST scanner source IPs and CI/QA automation and exclude them, or tag them separately. Restrict URL/content matching to the specific routes that render SunEditor output to cut noise. If server-side DOMPurify sanitization is deployed, downgrade payload-only matches without evidence of execution to informational and prioritize alerts where a persisted record was later served to a different authenticated user.


Hunting Queries

Hunt for SunEditor endpoints receiving XSS sanitizer-bypass payloads across web logs to find CVE-2026-59167 exploitation clusters.

Hunting — KQL
kql
AppServiceHTTPLogs | extend d = tolower(url_decode(strcat(CsUriStem,"?",CsUriQuery))) | where d has "suneditor" and d has_any ("onerror=","javascript:","<svg","srcdoc=","formaction=","onpointer") | summarize count() by ClientIp=CsHost, bin(TimeGenerated,1h)
Hunting — SPL
spl
index=web (sourcetype=iis OR sourcetype=access_combined) | eval d=lower(urldecode(_raw)) | where match(d,"suneditor") AND match(d,"onerror=|javascript:|<svg|srcdoc=|formaction=|onpointer") | stats count by src_ip

Atomic Red Team Tests

Test 1 SunEditor onerror handler injection
linux

Submit a crafted img tag with an onerror handler through a SunEditor-backed content endpoint to simulate the sanitizer bypass.

Command

bash
curl -sk -X POST 'https://lab.internal/editor/save' -H 'Content-Type: application/json' -d '{"content":"<img src=x onerror=alert(document.domain)>"}'

Cleanup

bash
curl -sk -X POST 'https://lab.internal/editor/delete' -d '{"content":"testxss"}' || true

Expected Telemetry

Web access log entry to /editor/save containing onerror= and an img tag targeting a SunEditor route.

Expected Detection

kql/spl web-log rule fires on suneditor endpoint + onerror= XSS token.

Test 2 SunEditor SVG/animation mXSS payload
linux

Send an SVG mutation-XSS payload leveraging onanimationstart to bypass the SunEditor sanitizer.

Command

bash
curl -sk -X POST 'https://lab.internal/comment' --data-urlencode 'body=<svg><style>@keyframes x{}</style><a onanimationstart=alert(1) style=animation-name:x></a></svg>'

Cleanup

bash
echo 'remove lab comment record via admin API'

Expected Telemetry

HTTP request to /comment with url-encoded <svg ... onanimationstart= payload.

Expected Detection

Detection matches suneditor/comment endpoint with onanimationstart bypass token.

Test 3 Vulnerable suneditor package install detection
linux

Install the vulnerable SunEditor version on a lab build host to exercise inventory/version detection.

Command

bash
npm install [email protected] --no-save && node -e "console.log(require('suneditor/package.json').version)"

Cleanup

bash
npm uninstall suneditor --no-save || true

Expected Telemetry

Process/command-line event showing npm install [email protected] and package.json version 2.47.10.

Expected Detection

CrowdStrike CQL / build-host inventory rule flags suneditor <= 2.47.10 as vulnerable to CVE-2026-59167.

Related Detections