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.5159 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: 4a0a0047304502204f3f61e7fc68a08f2af039cd614fff9f60f6d39d1b2cfc997b12dc74ad2e6e9d022100849aaab151986f617aacc29444ebf3fa78a1f26a2686f1f9f762f4ad092e0eb8:922c64590222798bb761d5b6d8e72950