Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-84803

CVE-2026-84803: SiYuan Stored XSS Vulnerability

CVE-2026-84803 is a stored XSS flaw in SiYuan allowing attackers to upload script-capable files that execute JavaScript to steal API tokens. This post explains the technical details, affected versions, and mitigation steps.

Updated:

CVE-2026-84803 Overview

CVE-2026-84803 is a stored cross-site scripting (XSS) vulnerability in SiYuan, an open-source personal knowledge management application. The flaw affects all versions of SiYuan before v3.8.2. The asset-serving component enforces an incomplete extension blocklist that omits several script-capable file types. Attackers with upload access can persist malicious files that execute JavaScript in the workspace context. Successful exploitation lets attackers steal API tokens and compromise the entire SiYuan workspace. The weakness is classified under CWE-79: Improper Neutralization of Input During Web Page Generation.

Critical Impact

Authenticated attackers can upload weaponized asset files that execute JavaScript in a victim's browser, exfiltrate SiYuan API tokens, and take over the affected workspace.

Affected Products

  • SiYuan versions prior to v3.8.2
  • SiYuan desktop and self-hosted server deployments serving user-uploaded assets
  • Multi-user SiYuan workspaces where assets are shared between accounts

Discovery Timeline

  • 2026-09-02 - CVE-2026-84803 published to NVD
  • 2026-09-02 - Last updated in NVD database

Technical Details for CVE-2026-84803

Vulnerability Analysis

SiYuan serves user-uploaded files from its asset directory over HTTP. To block script execution, the application maintains a denylist of dangerous file extensions. The denylist in versions before v3.8.2 misses several extensions that browsers still resolve to script-capable Multipurpose Internet Mail Extensions (MIME) types. Files with these extensions render as active content and execute embedded JavaScript in the SiYuan origin.

Because the payload lives on disk and is served on subsequent requests, the flaw is a stored XSS rather than a reflected one. Any user who opens a link to the uploaded asset triggers the payload in their session. The script runs same-origin with the SiYuan web interface and can call authenticated application programming interface (API) endpoints on the victim's behalf.

Root Cause

The root cause is denylist-based input filtering that fails open on unknown or uncommon extensions. Extensions such as .xht, .ehtml, .xsl, .xbl, and .rdf are not present in the blocklist but resolve to media types like application/xhtml+xml or application/xml that browsers parse and execute. The correct approach is an allowlist of safe MIME types combined with Content-Type and Content-Disposition: attachment headers on the asset endpoint.

Attack Vector

An authenticated attacker uploads a file with a script-capable but unfiltered extension containing an XSS payload. The attacker then shares the asset URL with another SiYuan user or embeds it inside a note. When a victim requests the file, the browser executes the payload in the SiYuan origin. The script reads the workspace API token from local storage or session state and sends it to an attacker-controlled endpoint. With the token, the attacker can read notes, modify content, and pivot to further workspace resources. See the GitHub Security Advisory GHSA-7h8j-qw37-w46g for additional technical detail.

Detection Methods for CVE-2026-84803

Indicators of Compromise

  • Files in the SiYuan asset directory with extensions .xht, .ehtml, .xsl, .xbl, or .rdf
  • Outbound HTTP requests from browser sessions containing SiYuan API tokens in query strings or POST bodies
  • Unexpected asset uploads followed by shared links between workspace users

Detection Strategies

  • Scan the SiYuan data/assets/ directory for files whose extensions fall outside the expected set of images, documents, and media
  • Inspect web server access logs for GET requests to asset paths ending in script-capable extensions
  • Alert on browser telemetry showing script execution from the SiYuan origin sourced from /assets/ URLs

Monitoring Recommendations

  • Forward SiYuan HTTP access logs and endpoint browser telemetry to a centralized analytics platform for correlation
  • Track use of SiYuan API tokens from unusual source addresses or user agents
  • Review asset-upload activity for accounts that upload uncommon file types shortly before sharing links

How to Mitigate CVE-2026-84803

Immediate Actions Required

  • Upgrade SiYuan to v3.8.2 or later on all desktop clients and self-hosted servers
  • Rotate all SiYuan API tokens after upgrade to invalidate any credentials that may have been exfiltrated
  • Audit the assets directory and remove files with .xht, .ehtml, .xsl, .xbl, or .rdf extensions that were not intentionally uploaded

Patch Information

SiYuan v3.8.2 extends the asset extension blocklist to cover the script-capable file types identified in the advisory. Refer to the Vulncheck advisory and the GitHub Security Advisory GHSA-7h8j-qw37-w46g for the fixed version and commit references.

Workarounds

  • Restrict asset uploads to trusted users until the patch is applied
  • Place SiYuan behind a reverse proxy that forces Content-Disposition: attachment on responses from /assets/ paths
  • Block the affected extensions at the proxy or web application firewall layer to prevent them from being served

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.