Response playbooks, investigation guides, and Atomic Red Team tests are Pro-only. Upgrade to unlock the full detection package for CVE-2026-54067.

Upgrade to Pro
CVE-2026-54067

SiYuan renderSnippet() CSS-Snippet Stored XSS to RCE (CVE-2026-54067)

Detects exploitation of CVE-2026-54067, a stored XSS vulnerability in SiYuan's kernel renderSnippet() function where attacker-controlled CSS snippets can break out of <style> tag context to inject executable HTML/JS. Given SiYuan's Electron-based desktop kernel exposes privileged local APIs (file read/write, plugin execution, shell access), successful XSS can escalate to full remote code execution on the host running the SiYuan kernel/server. Detection focuses on malicious CSS snippet creation/import via the kernel HTTP API, anomalous style-tag breakout payloads, and downstream RCE indicators such as unexpected child processes spawned by the SiYuan kernel binary.

Vulnerability Intelligence

Public PoC

Affected Software

Vendor
go
Product
github.com/siyuan-note/siyuan/kernel
Versions
< 0.0.0-20260628153353-2d5d72223df4

Weakness (CWE)

Timeline

Disclosed
July 10, 2026

CVSS

9.9
Critical (9.0–10)

CVSS vector not yet published

Write-up coming soon

What is CVE-2026-54067 SiYuan renderSnippet() CSS-Snippet Stored XSS to RCE (CVE-2026-54067)?

SiYuan renderSnippet() CSS-Snippet Stored XSS to RCE (CVE-2026-54067) (CVE-2026-54067) maps to the Initial Access and Execution and Privilege Escalation and Defense Evasion tactics — the adversary is trying to get into your network in MITRE ATT&CK.

This page provides production-ready detection logic for SiYuan renderSnippet() CSS-Snippet Stored XSS to RCE (CVE-2026-54067), covering the data sources and telemetry it touches: Web application logs, Process creation logs (Sysmon/EDR). 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 Execution Privilege Escalation Defense Evasion
Microsoft Sentinel / Defender
kusto
let SuspiciousSnippetPatterns = dynamic(["</style>","<script","onerror=","onload=","javascript:","expression(","</noscript>"]);
CommonSecurityLog
| where DeviceVendor =~ "SiYuan" or Activity has "snippet"
| where isnotempty(RequestURL)
| where RequestURL has_any ("/api/setting/setSnippet", "/api/system/setNetworkProxy", "snippet")
| extend Payload = tostring(parse_json(AdditionalExtensions).body)
| where Payload has_any (SuspiciousSnippetPatterns)
| project TimeGenerated, SourceIP, DeviceName, RequestURL, Payload, DestinationPort
| union (
DeviceProcessEvents
| where InitiatingProcessFileName has "siyuan" or InitiatingProcessCommandLine has "siyuan"
| where FileName in~ ("cmd.exe","powershell.exe","bash","sh","/bin/sh","osascript")
| project TimeGenerated, SourceIP=DeviceName, DeviceName, RequestURL=ProcessCommandLine, Payload=InitiatingProcessCommandLine, DestinationPort=int(null))
| sort by TimeGenerated desc

Detects (1) malicious CSS snippet payloads submitted to SiYuan's setSnippet API containing style-tag breakout sequences, and (2) suspicious child processes spawned by the SiYuan kernel process indicative of successful RCE post-XSS.

critical severity medium confidence

Data Sources

Web application logs Process creation logs (Sysmon/EDR)

Required Tables

CommonSecurityLog DeviceProcessEvents

False Positives

  • Legitimate advanced CSS customization by trusted admins using similar special characters
  • Security scanners/pentesters submitting test payloads during authorized assessments
  • Third-party plugins that legitimately inject inline scripts via approved extension APIs

Sigma rule & cross-platform mapping

The detection logic for SiYuan renderSnippet() CSS-Snippet Stored XSS to RCE (CVE-2026-54067) (CVE-2026-54067) 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:
  category: process_creation
  product: windows

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 1Submit CSS snippet with style breakout payload

    Expected signal: HTTP POST logged to /api/setting/setSnippet containing '</style>' and '<script>' tokens in the request body

  2. Test 2Trigger snippet render and observe script execution

    Expected signal: Browser/Electron process (siyuan.exe) network telemetry showing outbound request to the callback endpoint (e.g., 127.0.0.1:9999)

  3. Test 3Post-XSS local command execution via kernel API

    Expected signal: Process creation event showing a shell/interpreter (sh, bash) spawned with parent process name matching siyuan kernel binary

Unlock playbooks & atomic tests with Pro

Get the full detection package for CVE-2026-54067 — response playbook and atomic red team tests, plus investigation guidance and hunting queries.

df00tech Pro — £29/user/month

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections