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

CVE-2026-109310: SiYuan DOS Vulnerability via Template

CVE-2026-109310 is a denial of service vulnerability in SiYuan versions 3.1.12 through 3.8.5 that allows resource exhaustion through template functions. This post explains its impact, affected versions, and mitigation steps.

Published:

CVE-2026-109310 Overview

CVE-2026-109310 is a resource exhaustion vulnerability in SiYuan, an open-source personal knowledge management application. Versions from v3.1.12 up to (but not including) v3.8.6 fail to restrict the Sprig template function map exposed through the /api/icon/getDynamicIcon endpoint's content parameter. An authenticated publish reader, or any unauthenticated requester when publish authentication is disabled, can invoke uncapped Sprig functions such as until to trigger memory exhaustion. A single crafted request can out-of-memory kill the SiYuan kernel process, resulting in denial of service [CWE-770].

Critical Impact

One HTTP request to the dynamic icon API can OOM-kill the SiYuan kernel, taking down the knowledge base for all users.

Affected Products

  • SiYuan v3.1.12 through versions prior to v3.8.6
  • SiYuan deployments with publish authentication disabled (exposed to unauthenticated attackers)
  • SiYuan deployments granting publish reader access to untrusted users

Discovery Timeline

  • 2026-10-12 - CVE-2026-109310 published to the National Vulnerability Database (NVD)
  • 2026-10-13 - Last updated in NVD database

Technical Details for CVE-2026-109310

Vulnerability Analysis

SiYuan renders dynamic icons by passing user-supplied input from the content parameter of /api/icon/getDynamicIcon into a Go template that includes the full Sprig function library. The server does not sandbox or limit which Sprig helpers are callable, nor does it cap iteration counts, allocation sizes, or execution time. Sprig exposes list- and range-generation helpers such as until, untilStep, seq, and repeat that allocate memory proportional to caller-supplied integer arguments. An attacker who supplies a sufficiently large integer forces the kernel to allocate a slice large enough to exhaust process memory. The Go runtime responds by terminating the SiYuan kernel, dropping all active sessions and halting note synchronization.

Root Cause

The root cause is unrestricted exposure of a powerful templating function map on an endpoint that accepts attacker-controlled content. There is no allowlist of safe Sprig functions, no numeric bounds check on template arguments, and no memory or execution ceiling applied to template rendering. The access control layer treats dynamic icon rendering as a low-risk read, so publish readers can reach it, and anonymous callers can reach it when publish authentication is disabled.

Attack Vector

Exploitation requires only network access to the SiYuan HTTP API and, at most, publish reader credentials. The attacker issues a POST request to /api/icon/getDynamicIcon with a content field containing a Sprig template that invokes until (or a similar range helper) with a very large integer. The kernel evaluates the template, attempts to materialize the oversized collection, exhausts available memory, and is killed by the operating system. The attack is low-complexity, requires no user interaction, and no code execution primitive is needed beyond template syntax. See the GitHub Security Advisory and the VulnCheck Denial of Service Advisory for additional technical context.

Detection Methods for CVE-2026-109310

Indicators of Compromise

  • Repeated or anomalous POST requests to /api/icon/getDynamicIcon from a single source
  • Request bodies containing Sprig template directives such as {{until, {{untilStep, {{seq, or {{repeat inside the content parameter
  • SiYuan kernel process restarts correlated with sudden spikes in resident memory
  • Operating system oom-killer log entries naming the SiYuan kernel binary

Detection Strategies

  • Inspect reverse proxy and web application firewall logs for requests to /api/icon/getDynamicIcon containing Go template delimiters {{ and }}
  • Alert when a single IP issues more than a few dynamic icon requests per minute, or when request bodies exceed expected size for icon content
  • Correlate SiYuan process exits with high memory pressure events on the host

Monitoring Recommendations

  • Enable verbose access logging on the SiYuan HTTP listener and forward logs to a central analytics platform
  • Monitor container or host memory utilization for the SiYuan kernel and alert on sustained growth above baseline
  • Track process lifecycle events to detect unexpected kernel restarts that may indicate exploitation attempts

How to Mitigate CVE-2026-109310

Immediate Actions Required

  • Upgrade SiYuan to v3.8.6 or later, which restricts the Sprig function map exposed to the dynamic icon endpoint
  • Enable publish authentication on any SiYuan instance reachable from untrusted networks
  • Revoke publish reader access from accounts that do not require it until the upgrade is complete
  • Place SiYuan behind a reverse proxy that enforces request body size limits and per-source rate limits

Patch Information

The maintainers resolved CVE-2026-109310 in SiYuan v3.8.6. Review the GitHub Security Advisory GHSA-cxwr-r7cq-xw52 for the authoritative fix details and release notes. Operators running any version in the range v3.1.12 to pre-v3.8.6 should upgrade without delay.

Workarounds

  • Block or rate-limit /api/icon/getDynamicIcon at the reverse proxy for untrusted sources until the patch is applied
  • Reject request bodies containing Go template delimiters on the icon endpoint using a web application firewall rule
  • Enforce memory limits on the SiYuan container or systemd unit so an OOM event is contained and auto-restarted
bash
# Example nginx snippet to restrict the vulnerable endpoint
location = /api/icon/getDynamicIcon {
    limit_req zone=siyuan_icons burst=5 nodelay;
    client_max_body_size 2k;
    proxy_pass http://siyuan_upstream;
}

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

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.