CVE-2026-73054: SiYuan: A parser differential between the WebSocket keepalive exemption and the session quarantine allows unauthenticated access to the broadcast event stream
SiYuan's kernel WebSocket on /ws can be reached without credentials even when an access auth code is set. An unauthenticated remote caller can read the live broadcast event stream, which leaks document and notebook titles, IDs and paths. The Go module github.com/siyuan-note/siyuan/kernel is fixed in 0.0.0-20260731131820-67bc300b6ea6, which is in release v3.7.4-alpha.4.
Published Oct 23, 2026 · Analysis Nov 2, 2026
What an attacker can do
Two checks parse the same request URI in different ways. The authentication exemption for keepalive sessions in kernel/server/serve.go uses strings.Contains for /ws?app=siyuan and &id=auth&type=auth. The quarantine in kernel/util/websocket.go reads id with Go's url.Values.Get, which returns only the first value of a repeated key.
An attacker sends /ws?app=siyuan&id=main&type=main&id=auth&type=auth. The substring check passes, so no cookie, JWT or access auth code is needed. The parsed query says id=main and type=main, so the session is not quarantined. It lands in the broadcast pool and receives events for type main.
In the researcher's proof of concept, this socket got 19 to 30 frames. They included savedoc, transactions with updateAttrs carrying document titles, filetreeSortChanged with the full ordered child IDs of a notebook, and create events with notebook names. A canary string in a document body never appeared, so body content was not seen. No writes were observed. The attack is network-reachable, needs no interaction, and is confidentiality-only. It also bypasses the earlier fix for GHSA-xp2m-98x8-rpj6. /ws has no origin check, so a web page can also try it cross-origin.
Who is affected
Any SiYuan kernel built before Go pseudo-version 0.0.0-20260731131820-67bc300b6ea6 that is reachable over the network with an access auth code configured. The code path is the kernel port, not the publish port.
For a source or Go build, check the module version:
go list -m github.com/siyuan-note/siyuan/kernelFor desktop, Docker or packaged installs, compare your version against v3.7.4-alpha.4 under Settings, About.
github.com/siyuan-note/siyuan/kernel
- Ecosystem
- Go
- Affected
- < 0.0.0-20260731131820-67bc300b6ea6
- Fixed in
- 0.0.0-20260731131820-67bc300b6ea6
- Check
go list -m github.com/siyuan-note/siyuan/kernel
How to fix it
Upgrade to a build that contains commit 67bc300b6ea6, that is Go version 0.0.0-20260731131820-67bc300b6ea6 or later. Release v3.7.4-alpha.4 is the tagged release linked from the advisory. It is marked as a pre-release, and its notes list only a generic security fix. I found no stable release named as containing the fix.
Until you can upgrade, do not expose the kernel port to untrusted networks. Put it behind a VPN or a reverse proxy that rejects /ws URIs with repeated id or type query keys. The advisory suggests the real fix: parse the query, require id and type to equal auth exactly, and reject duplicated keys.
How to tell if you were hit
Search reverse-proxy or access logs for WebSocket upgrade requests to /ws that carry id= or type= twice, especially main followed by auth, for example /ws?app=siyuan&id=main&type=main&id=auth&type=auth. Legitimate keepalive clients send each key once. Requests like this from addresses that never logged in point to an attempt. Because the leak is passive, the SiYuan kernel log shows nothing special. Treat document titles, notebook names and file paths as exposed if such a request succeeded.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary
Two checks on the same WebSocket request URI parse it differently. The authentication exemption for keepalive sessions matches raw substrings, while the quarantine introduced to contain those sessions reads a parsed query parameter. Because Go's url.Values.Get returns only the first value for a repeated key, a single URI can satisfy the exemption and still resolve to a non-auth session identity.
The result is that an unauthenticated remote caller connects to the kernel WebSocket with a valid access auth code configured, is placed in the general broadcast pool rather than the quarantined pool, and receives the live event stream.
Details
The exemption matches substrings. kernel/server/serve.go:1222 on the development branch, :1074 on master:
authOk = strings.Contains(s.Request.RequestURI, "/ws?app=siyuan") &&
strings.Contains(s.Request.RequestURI, "&id=auth&type=auth")Neither operand is parsed. Any URI containing both literals is exempted, regardless of what the query actually resolves to.
The quarantine parses. Commit 1e370e373 added the containment for exempted sessions at kernel/util/websocket.go:171:
id = session.Request.URL.Query().Get("id")
return "auth" == idurl.Values.Get returns the first value for a repeated key.
The differential. For the URI:
/ws?app=siyuan&id=main&type=main&id=auth&type=auth- It contains
/ws?app=siyuanand&id=auth&type=auth, soauthOkis true. No cookie, no JWT and no access auth code are required. Query().Get("id")returnsmain, soIsAuthSessionis false.AddPushChanfiles the session insessions, the broadcast pool, rather than inauthSessions.Query().Get("type")returnsmain, so the session matchesBroadcastByType("main", ...).- Without a valid
X-Auth-Tokenthe publish flag is never set, soisPublishSession()does not exclude it either.
Every guard that should have caught the session keys off a different parse than the one that admitted it.
No origin validation. CheckOrigin does not appear on the /ws path, so the cross-origin vector described in the parent advisory also remains available.
Distinction from the existing broadcast-pool advisory. GHSA-mw8r-mw84-88v2 concerns the publish port, where an anonymous session is expected to connect and the defect is that broadcast content is not gated for it afterwards. This report concerns the kernel port with an access auth code configured, where the session should never be admitted in the first place. The leaked data overlaps because both end in the same broadcast pool, but the mechanisms and the affected deployments are different, and gating publish sessions does not close this path.
Proof of Concept
Kernel port, --accessAuthCode set. Three WebSocket connections, none carrying credentials of any kind.
| Socket | Query | Result | | A, baseline | `?app=siyuan&id=main&type=main` | Rejected, closed 1002, 0 frames | | B, control | `?app=siyuan&id=auth&type=auth` | Connects, 0 frames | | C, attack | `?app=siyuan&id=main&type=main&id=auth&type=auth` | Connects, 19 to 30 frames across two runs |
Socket A establishes that the access auth code is enforced. Socket B establishes that the existing quarantine works exactly as intended, admitting the keepalive session but delivering nothing to it. Socket C differs from B only in the duplicated parameters, and receives the event stream.
Frames observed on socket C included savedoc ("action":"create","data":{"Root":{"ID": ...), transactions ("action":"updateAttrs" carrying document titles), filetreeSortChanged (the notebook's complete ordered childIDs), create (a notebook object including its name), and backgroundtask.
A canary string placed inside a document body did not appear in any frame, on a full-text search of all captured frames.
Impact
An unauthenticated remote caller obtains the kernel's live event stream on a deployment protected by an access auth code, with no user interaction and no prior knowledge of the instance.
Precisely what is disclosed: document identifiers and titles, notebook identifiers and names, file paths, the complete ordered child structure of notebooks, and the full stream of create, update and delete operations as they occur. Document body content is not present in the observed frames.
That set corresponds to the disclosure claimed by GHSA-xp2m-98x8-rpj6, which means the remediation for that advisory is bypassable rather than incomplete in scope. The absence of origin validation on the endpoint additionally preserves the cross-origin reachability described there.
Confidentiality only. No frames observed permitted writes.
Suggested fix
Make both checks agree, and stop re-parsing attacker-controlled input after admission.
- In the exemption, parse the query rather than matching substrings, and require
idandtypeeach to equalauthexactly. - Reject requests carrying duplicated query keys on this endpoint, so no URI can present two identities.
- Record the exemption as a flag on the session at connect time, and have
IsAuthSessionread that flag rather than re-parsing the request. A session admitted under the keepalive exemption is then quarantined by construction, independent of how its URI is read later.
Adding origin validation to /ws would additionally close the cross-origin vector.
Credited to Shirshakhtml.
Questions
- Does CVE-2026-73054 expose my note contents?
The researcher saw document IDs and titles, notebook names, file paths, notebook structure and the create, update and delete stream. A canary in a document body was not in any frame, so body text was not observed.
- Does an access auth code protect me?
Not on affected builds. The flaw is that a crafted /ws URI skips the access auth code check. A plain request with id=main is rejected, but one with repeated id and type keys is admitted.
- How is this different from GHSA-mw8r-mw84-88v2?
That advisory covers the publish port, where an anonymous session is expected and broadcast content is not gated afterwards. This one covers the kernel port with an access auth code set, where the session should never be admitted.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More Go vulnerabilities
All Go entriesCVE-2026-60083
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
medium4.9Oct 27, 2026CVE-2026-62204
SiYuan: Missing consistency check between packageName and repoURL/repoHash in bazaar package install allows overwriting an existing, trusted plugin
medium6.6Oct 23, 2026CVE-2026-73049
SiYuan: The publish filter for database backlinks consults the forbidden list instead of the visibility list, disclosing hidden-tier documents to anonymous readers
medium5.8Oct 23, 2026CVE-2026-73630
SiYuan: authFilePublishAccess distinguishes hidden and forbidden documents from public and nonexistent ones, and issues a publish-auth cookie for documents it reports as forbidden
medium5.8Oct 23, 2026GHSA-xp3q-r38w-vgqm
SiYuan: The publish filter for local storage returns the administrator's entire storage map with only three keys sanitized
medium5.8Oct 23, 2026GHSA-3cm4-ccvw-6xr6
SiYuan: /history/*path and /repo/diff/*path potentially exposing historical snapshots of data/.siyuan/publishAccess.json and data/templates/*
medium4.9Oct 5, 2026
