Oct 3, 2026·5 min read·16 visits
SiYuan is vulnerable to Cross-Site WebSocket Hijacking (CSWSH) because its internal WebSocket handlers disable browser origin validation. This allows attackers to establish persistent tunnels, execute SSRF, and pivot into the victim's local network.
CVE-2026-74802 is a critical Cross-Site WebSocket Hijacking (CSWSH) vulnerability in the SiYuan knowledge workspace application. Due to improper origin validation across multiple internal WebSocket endpoints, an attacker can hijack active authenticated sessions when a victim visits an untrusted external page. This allows the attacker to route malicious network traffic through the victim's localized SiYuan server, establishing an authenticated network pivot and facilitating Server-Side Request Forgery (SSRF).
SiYuan is an open-source, local-first knowledge management platform developed in Go. To support real-time data synchronization, RPC functions, and plugin communication, the application exposes several WebSocket endpoints. These endpoints run on port 6806 by default and handle highly privileged system activities.\n\nOne of the most sensitive operations exposed is the administrative network proxy endpoint, located at /ws/network/proxy. This route is designed to tunnel network traffic directly through the SiYuan kernel binary. Because this endpoint and several others lack validation controls, they represent a significant attack surface to malicious actors online.\n\nUnder standard Same-Origin Policy (SOP) rules, web browsers do not restrict cross-site WebSocket handshakes. It is the responsibility of the receiving server to validate the Origin header sent in the initial HTTP upgrade request. When this validation is omitted, any third-party script running in a user's browser can interact with the WebSocket server, bypassing conventional CORS restrictions.
The root cause of CVE-2026-74802 is an Origin Validation Error (CWE-346) in the initialization of the application's WebSocket upgrader instances. Specifically, within kernel/api/network.go, the CheckOrigin callback function of the gorilla/websocket library was explicitly overridden to bypass security checks.\n\nThe original implementation defined a CheckOrigin callback that unconditionally returned true. This explicit instruction forced the Go web server to accept incoming WebSocket connections regardless of the domain specified in the request's Origin header. An attacker-controlled site could thus successfully initiate a handshake.\n\nThis structural security defect extended beyond the proxy endpoint. The primary WebSocket server running inside kernel/server/serve.go used the melody library without configuring any origin checks. Likewise, the broadcast channels in kernel/api/broadcast.go and the plugin-based RPC endpoints in kernel/plugin/rpc.go used Go WebSocket Server (GWS) upgraders that lacked verification controls.
In vulnerable versions of SiYuan, the network proxy endpoint was upgraded using the following structure in kernel/api/network.go:\n\ngo\n// Vulnerable: CheckOrigin returns true unconditionally\nupgrader := websocket.Upgrader{\n\tCheckOrigin: func(r *http.Request) bool { return true },\n}\nclientConn, upgradeErr := upgrader.Upgrade(c.Writer, c.Request, upgradeHeaders)\n\n\nBecause the server does not perform checks, browsers transmitting the upgrade request automatically supply any existing session cookies. The server accepts the handshake and opens a persistent TCP socket. The fixed implementation replaces this anonymous function with an origin-checking utility function:\n\ngo\n// Patched: Origin header is verified against the Host header\nupgrader := websocket.Upgrader{\n\tCheckOrigin: func(r *http.Request) bool {\n\t\treturn util.IsSessionOriginAllowed(r.Header.Get(\"Origin\"), r.Host)\n\t},\n}\nclientConn, upgradeErr := upgrader.Upgrade(c.Writer, c.Request, upgradeHeaders)\n\n\nTo ensure complete system coverage, similar checks were added across all WebSocket routers. For example, in the broadcast handler in kernel/api/broadcast.go:\n\ngo\nwebsocket := melody.New()\n// Upgrader now validates origin headers\nwebsocket.Upgrader.CheckOrigin = func(r *http.Request) bool {\n\treturn util.IsSessionOriginAllowed(r.Header.Get(\"Origin\"), r.Host)\n}\n
To exploit this vulnerability, an attacker must lure an authenticated SiYuan user to visit a malicious website under the attacker's control. The malicious page runs client-side JavaScript that attempts to construct a WebSocket connection back to the victim's local loopback interface.\n\nmermaid\ngraph LR\n AttackerHost[\"Attacker Page (evil.com)\"] -- \"1. Serves exploit JS\" --> VictimBrowser[\"Victim's Browser\"]\n VictimBrowser -- \"2. WS Handshake (Origin: evil.com)\" --> SiYuan[\"SiYuan (localhost:6806)\"]\n SiYuan -- \"3. Returns Connection Accepted (101)\" --> VictimBrowser\n VictimBrowser -- \"4. Sends malicious proxy connect\" --> SiYuan\n SiYuan -- \"5. Exploit connects internal DB\" --> InternalService[\"Internal Network (192.168.1.50)\"]\n\n\nBecause the application is running locally on port 6806, the exploit script targets ws://127.0.0.1:6806/ws/network/proxy. Once the connection is open, the attacker sends control messages specifying target internal hosts. The local SiYuan Go binary acts as a forward proxy, connecting to localized targets and returning raw responses back to the attacker's script.
The CVSS base score of 8.2 reflects the significant threat this flaw poses to host environments. Because the target is typically a local installation on a user's workstation or a container inside a private network segment, successful exploitation facilitates pivoting.\n\nAttackers can leverage the compromised connection to perform port scanning against the local host and adjacent LAN environments. They can also target internal services, such as database administration interfaces or cloud instance metadata services (IMDS), which are normally protected behind perimeter firewalls.\n\nThis attack sequence requires zero authentication from the attacker's perspective, as it leverages the victim's ambient browser authentication. It results in high confidentiality loss and moderate integrity loss, with the compromised host performing unauthorized actions under the identity of the authenticated user.
The primary remediation strategy is upgrading the SiYuan installation to version 3.7.4 or later. In these updated versions, the developers implemented rigorous checking routines via IsSessionOriginAllowed to confirm the request origin matches the allowed deployment host.\n\nFor environments where patching cannot be immediately completed, administrators should apply local network mitigations. Restrict access to port 6806 by binding the application service specifically to 127.0.0.1 rather than 0.0.0.0. Implement local firewall policies (iptables or Windows Firewall) to drop incoming external connections on this port.\n\nTo monitor for potential exploitation attempts, security operations teams should analyze proxy logs for WebSocket upgrade requests where the Origin header contains an external, unknown, or null value. Additionally, inspect local process execution logs to detect unexpected outbound traffic originating from the SiYuan binary.
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
SiYuan SiYuan | < 3.7.4 | 3.7.4 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-346 (Origin Validation Error) |
| Attack Vector | Network (AV:N) |
| CVSS v3.1 Score | 8.2 |
| EPSS Score | 0.00164 |
| Exploit Status | Proof-of-Concept |
| KEV Status | Not Listed |
The software does not properly validate or verify that the origin of a request is correct or expected.
CVE-2026-88989 (tracked as GHSA-3qh3-54qg-gpq3) is a missing authorization vulnerability (CWE-862) in the Silverstripe Framework affecting versions prior to 6.2.13. The flaw exists within the GridFieldDetailForm_ItemRequest request handler, which orchestrates record creation and editing workflows inside the Silverstripe CMS backend. Specifically, the server-side persistence method saveFormIntoRecord() fails to verify whether an authenticated user possesses the necessary creation permissions (canCreate) when processing an unpersisted DataObject record. Consequently, a low-privileged CMS user who has permission to access a GridField interface and edit existing records can bypass role-based creation restrictions. By sending a crafted HTTP POST request directly to the item/new endpoint with the action_doSave parameter, the user can instantiate and persist unauthorized database records. The vulnerability is rated Medium severity with a CVSS v3.1 base score of 4.3 and is remediated in Silverstripe Framework version 6.2.13.
Silverstripe Framework prior to version 6.2.13 contains an improper privilege management vulnerability (CWE-269) within the Group authorization and validation logic. A delegated administrator possessing the CMS_ACCESS_SecurityAdmin permission, but lacking full ADMIN privileges, can edit or reparent groups that acquire administrative capabilities indirectly via permission roles or ancestor inheritance. By adding their own account to such a group or moving a controlled group underneath a role-privileged parent, the user escalates to full administrative access across the CMS.
A missing authorization and type validation vulnerability in Silverstripe Framework prior to version 6.2.13 allows authenticated CMS users to convert database records into arbitrary DataObject classes via user-controlled ClassName parameters in GridField detail forms.
CVE-2026-91115 (GHSA-c94f-87xg-65wf) is an unsafe reflection vulnerability in the Silverstripe Framework affecting versions 6.0.0 prior to 6.2.13. The built-in development task i18nTextCollectorTask passes the user-supplied 'writer' parameter directly to Silverstripe's dependency injection container (Injector::inst()->get()) without verifying that the requested class implements the expected Writer interface. Because the dependency injector supports instantiating arbitrary classes with attacker-supplied constructor arguments, and because nested task URLs bypassed interactive confirmation middleware, an attacker can achieve remote code execution via unauthenticated requests on development instances or via Cross-Site Request Forgery (CSRF) against authenticated administrators on production instances.
CVE-2026-129237 is a partial path traversal (Zip Slip) vulnerability in qbee-agent, the device agent for the qbee.io IoT device management platform. Prior to version 2026.41, the tar archive extraction routine in app/utils/tar.go used strings.HasPrefix without enforcing a directory separator boundary. When the Docker Compose bundle configuration has UseContext enabled, an authenticated user with delegated configuration or file management privileges can supply a crafted tar archive containing sibling-prefix traversal sequences, allowing directory creation and file writes into adjacent sibling directories outside the intended extraction root.
CVE-2026-128118 (GHSA-m9j8-jcmv-hp69) is an information disclosure vulnerability affecting the SvelteKit framework (@sveltejs/kit) from version 3.0.0 through 3.1.0. A design flaw in the build-time Vite module guard plugin (plugin_guard) failed to register src/params.js as a client entry point and implemented a fail-open validation model. Consequently, server-only modules and private environment variables imported directly or dynamically within parameter matchers were compiled into publicly accessible client-side JavaScript bundles without triggering a build error.