CVE-2026-54068: SiYuan Authentication Bypass & Database Exfiltration
SiYuan, an open-source personal knowledge management system, contains an authentication bypass vulnerability in its icon retrieval API endpoint. The /api/icon/getDynamicIcon endpoint is intentionally excluded from authentication checks but executes server-side Go templates that can query the underlying SQLite database. An attacker without login credentials can exploit this by sending a specially crafted request with a known block ID to extract all of a user's notes, tags, file references, and metadata. The vulnerability affects all versions before 3.7.0 and is resolved in that release.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 5.9 MEDIUM · CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
- Weaknesses (CWE)
- CWE-306
- Affected products
- 0 configuration(s)
- Published / Modified
- 2026-06-24 / 2026-06-25
NVD description (verbatim)
SiYuan is an open-source personal knowledge management system. Prior to 3.7.0, the /api/icon/getDynamicIcon endpoint is explicitly excluded from authentication in SiYuan's kernel router (router.go, "不需要鉴权" -- no auth needed). When called with type=8 and a valid block id parameter, this endpoint invokes RenderDynamicIconContentTemplate, which executes a Go template that includes the querySQL and queryBlocks functions. These functions run arbitrary SELECT statements against the SiYuan SQLite database. An unauthenticated network-adjacent attacker who knows a valid block ID can exfiltrate all user note content, tags, asset references, and block attributes from the database. This vulnerability is fixed in 3.7.0.
2 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The vulnerability stems from a design flaw in SiYuan's router configuration where the /api/icon/getDynamicIcon endpoint is explicitly marked as not requiring authentication. When called with type=8 and a valid block ID, the endpoint invokes RenderDynamicIconContentTemplate, which processes a Go template containing the querySQL and queryBlocks functions. These template functions lack proper input validation and allow arbitrary SQL SELECT queries against the SQLite database backing SiYuan. An attacker who can guess or enumerate valid block IDs can chain multiple requests to reconstruct an entire knowledge base. The vulnerability is classified as CWE-306 (Missing Authentication for Critical Function).
Business impact
For organizations or individuals using SiYuan to store sensitive research, competitive intelligence, personal planning data, or internal documentation, this vulnerability poses a direct confidentiality breach. Because the attack requires no authentication and works over the network, any SiYuan instance exposed to untrusted networks—including cloud deployments or instances behind weak firewall rules—is at risk. The attacker gains read access to the complete content of the knowledge base, including cross-references and metadata that might reveal organizational structure or strategic information. Data exfiltration is silent and leaves minimal forensic traces if query logging is not enabled.
Affected systems
SiYuan versions prior to 3.7.0 are vulnerable. The attack surface is limited to deployments where the SiYuan kernel is accessible from untrusted networks. Local-only deployments or those behind properly configured reverse proxies with authentication enforcement are at reduced risk, but the auth-bypass nature of the vulnerability means that even restricted networks may be compromised if any actor can reach the endpoint. The vulnerability does not affect SiYuan 3.7.0 or later.
Exploitability
Exploitation requires network-adjacent access to the SiYuan API endpoint and knowledge of a valid block ID. The latter is not a significant barrier since block IDs can be enumerated systematically or discovered through passive information gathering if any content has been indexed or shared. No authentication credentials are needed. The CVSS score of 5.9 reflects that while the attack is network-reachable, it requires moderate effort to construct valid payloads and identify target block IDs. The attack is not wormable or remotely triggerable en masse without reconnaissance, but is practical for targeted data theft.
Remediation
Update SiYuan to version 3.7.0 or later, which removes the authentication bypass by properly gating access to the /api/icon/getDynamicIcon endpoint or removing the dangerous template functions. Organizations unable to patch immediately should restrict network access to the SiYuan API to trusted clients only, implement a reverse proxy with authentication enforcement, and disable or firewall the /api/icon/ endpoints if not required for core functionality.
Patch guidance
Verify that your SiYuan instance is running version 3.7.0 or later by checking the version string in the application settings or by inspecting the release notes at the official SiYuan repository. If you are on an earlier version, download and install 3.7.0 from the official source. For containerized deployments, ensure that your image tag or digest reflects the patched version. Test the upgrade in a non-production environment first to confirm compatibility with your data and plugins. No data migration or manual configuration changes are required after upgrading.
Detection guidance
Monitor access logs for the /api/icon/getDynamicIcon endpoint, particularly requests with type=8 and block ID parameters that do not correlate with legitimate user activity. Look for repeated or systematic block ID enumeration attempts. If query logging is enabled in SQLite, inspect logs for unusual SELECT queries that reference block content or metadata tables outside of normal user-initiated operations. Examine network traffic for POST or GET requests to /api/icon/getDynamicIcon from external or unexpected sources. Check for any unexplained data exfiltration or bandwidth spikes that might indicate bulk data extraction.
Why prioritize this
Although the CVSS score is medium (5.9), this vulnerability should be prioritized for patching because it enables complete, silent exfiltration of sensitive knowledge base content without authentication. The ease of exploitation—requiring only network access and block ID enumeration—makes it attractive to adversaries targeting knowledge workers, consultants, researchers, and organizations storing competitive or sensitive information in SiYuan. The lack of any authentication layer amplifies the risk relative to the score.
Risk score, explained
The CVSS 3.1 score of 5.9 (MEDIUM) reflects a network-reachable vulnerability with high confidentiality impact but no integrity or availability impact, and no requirement for user interaction or privilege escalation. The AC:H (Attack Complexity High) rating accounts for the need to identify or guess a valid block ID, which slightly lowers the score from what would otherwise be a higher rating. However, the real-world exploitability is higher than the CVSS score suggests because block IDs are often predictable or can be enumerated through automated scanning.
Frequently asked questions
Can the attacker modify or delete my notes using this vulnerability?
No. This vulnerability permits only read access via SELECT queries. The attacker cannot alter or delete data. However, exfiltration of sensitive information is a serious threat on its own.
Does updating SiYuan to 3.7.0 require me to re-authenticate or migrate my data?
No. The update is a straightforward version bump with no breaking changes or data migration requirements. Your notes and configuration remain intact.
Is my SiYuan instance vulnerable if it is only accessible on my local network?
The vulnerability requires network-adjacent access, so a truly isolated local-network-only deployment has lower risk. However, if your local network includes untrusted devices or users, or if the instance is accessible via VPN, the risk remains. Upgrading is still strongly recommended.
How can I tell if my SiYuan instance has been exploited?
Review access logs for requests to /api/icon/getDynamicIcon with type=8. Check for any unexplained outbound data transfers or bandwidth spikes. If query logging is enabled, inspect SQLite logs for suspicious SELECT statements. However, the lack of application-level logging in older versions may mean exploitation leaves limited traces.
This analysis is provided for informational and defensive purposes only. The information herein is based on publicly disclosed vulnerability details and should not be considered as legal advice or a comprehensive risk assessment for your specific environment. Verify all patch versions and vendor guidance directly against official SiYuan releases and documentation. Test patches in a non-production environment before deployment. SEC.co and its analysts make no representations regarding the exploitability or impact of this vulnerability in any given deployment, and users are responsible for assessing their own exposure and implementing appropriate controls. Source: NVD (public-domain), retrieved 2026-08-02. Analysis generated by SEC.co (claude-haiku-4-5).
Weaknesses (CWE)
Related vulnerabilities
- CVE-2026-10283MEDIUMBottelet DaybydayCRM Authentication Bypass in Settings Handler
- CVE-2026-11238MEDIUMChrome DevTools Memory Disclosure via Malicious Extension
- CVE-2026-11848MEDIUMiRM-IEI Remote Management Missing Authentication Vulnerability
- CVE-2026-25599MEDIUMOrca Heat Pump Unauthenticated HTTP and Stored XSS Vulnerability
- CVE-2026-2675MEDIUMRTI Connext Professional Data Source Spoofing Vulnerability
- CVE-2026-41047MEDIUMqSnapper Snapshot Diff Authentication Bypass (CVSS 5.5)
- CVE-2026-45610MEDIUMWWBN AVideo 2FA CSRF Vulnerability – Cross-Site Account Takeover Risk
- CVE-2026-50082MEDIUMAqara Cloud Developer Portal Missing Authentication - Device Takeover Risk