HexBrain

Browse / CVEs / CVE-2026-116167

CVE-2026-116167· siyuan-note / siyuan· CWE-79

SiYuan 2.9.0-3.8.6 - Unauthenticated XSS via check-auth "to" Parameter

highseverity
7.6CVSS score
0.7%likelihood of exploitation, next 30 days
52%of all CVEs are less likely
Readycheck to confirm it

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.

Fix

Update to SiYuan 3.8.7 or later, which routes the `to` value through safeRedirectTarget and only allows same-origin destinations.

How to confirm it

Send: GET /check-auth?to=javascript:alert(document.domain)
Positive when: contains(to_lower(body), "siyuan") and contains(body, "searchParams.get(\"to\")") and contains(body, "location.href = url.searchParams.get") || contains(body, "location.href = toPath") and !contains(… AND contains in content_type "text/html" AND status 200

Run it with nuclei: nuclei -id CVE-2026-116167 -u <target>

The full check
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.51741
    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

References

Use this check only on systems you are authorised to test. Where the data comes from