---
id: "CVE-2026-116170"
kind: "vulnerability"
aliases: ["CVE-2026-116170"]
title: "SiYuan: SQL injection lets admin-token holders read deleted document history"
severity: "medium"
cvss: 6.9
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["package", "self-hosted", "siyuan"]
not_affected_if: ["single-user-desktop", "version-3.8.7-or-later"]
published_at: "2026-10-25T14:16:56+00:00"
first_seen_at: "2026-10-25T14:41:23+00:00"
updated_at: "2026-10-25T14:42:43+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-116170", "first_seen_at": "2026-10-25T14:41:23+00:00"}]
---

# SiYuan: SQL injection lets admin-token holders read deleted document history

SiYuan before v3.8.7 fails to escape the op and type query values sent to its history endpoints, so SQL injection is possible. An attacker holding the admin token can use crafted UNION SELECT payloads to read history.db, exposing deleted document content, titles and paths.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed SiYuan version against `3.8.7`; anything older is in scope.
- unknown for other checks; the sources do not name a config file or endpoint log to inspect.

## Fix

- Upgrade SiYuan to `v3.8.7` or later.
- Rotate the SiYuan admin token if it may have been exposed to untrusted parties.

## Timeline

- 2026-10-25T14:41:23+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-116170

## From the sources

SiYuan before v3.8.7 contains an sql injection vulnerability that allows admin-token holders to read history.db by injecting unescaped op and type=3 query values. Attackers can send crafted UNION SELECT payloads to searchHistory or getHistoryItems endpoints to exfiltrate deleted document content, titles, and paths.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
