Description
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.
Published: 2026-06-24
Score: 5.9 Medium
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

SiYuan before version 3.7.0 has a route that does not require authentication. When an attacker calls /api/icon/getDynamicIcon with type=8 and a valid block ID, the server renders a Go template that evaluates user supplied SQL. The querySQL and queryBlocks functions execute arbitrary SELECT statements against the SQLite database, allowing the attacker to read all note content, tags, asset references, and block attributes. The flaw is a missing authentication mechanism (CWE-306) that leads to data leakage but does not provide arbitrary code execution.

Affected Systems

The vulnerability affects the open‑source personal knowledge management system SiYuan (vendor siyuan-note:siyuan). All releases prior to 3.7.0 contain the flaw; versions 3.7.0 and newer have the issue fixed.

Risk and Exploitability

The CVSS score is 5.9, indicating moderate severity. EPSS data is unavailable, and the vulnerability is not listed in the CISA KEV catalog. An unauthenticated, network‑adjacent attacker who knows a valid block ID can exploit the endpoint, leveraging the missing authentication to execute SELECT queries and pull sensitive database content. The attack requires only network access to the service and knowledge of a block ID, making it feasible in environments where block IDs are discoverable.

Generated by OpenCVE AI on June 24, 2026 at 23:43 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade SiYuan to version 3.7.0 or later to eliminate the missing authentication flaw
  • Scope the network access to the SiYuan instance by placing the service behind firewall rules or a reverse proxy that restricts exposure to trusted networks
  • Monitor web server logs for unexpected calls to /api/icon/getDynamicIcon with type=8 and investigate any anomalous activity

Generated by OpenCVE AI on June 24, 2026 at 23:43 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 24 Jun 2026 21:45:00 +0000

Type Values Removed Values Added
Description 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.
Title SiYuan: Unauthenticated SQLite Data Exfiltration via Template Injection in /api/icon/getDynamicIcon
Weaknesses CWE-306
References
Metrics cvssV3_1

{'score': 5.9, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-06-24T21:15:14.983Z

Reserved: 2026-06-11T18:24:35.097Z

Link: CVE-2026-54068

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-06-24T23:00:06Z

Weaknesses
  • CWE-306

    Missing Authentication for Critical Function