Skip to content

Unauthenticated WebSocket DoS via Auth Keepalive Bypass

High
88250 published GHSA-3g9h-9hp4-654v Mar 18, 2026

Package

siyuan

Affected versions

<=v3.6.1

Patched versions

v3.6.2

Description

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

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

CVE ID

CVE-2026-33203

Weaknesses

Improper Input Validation

The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. Learn more on MITRE.

Uncaught Exception

An exception is thrown from a function, but it is not caught. Learn more on MITRE.

Missing Authentication for Critical Function

The product does not perform any authentication for functionality that requires a provable user identity or consumes a significant amount of resources. Learn more on MITRE.

Credits