{"id":"CVE-2026-116170","kind":"vulnerability","aliases":["CVE-2026-116170"],"related":[],"title":"SiYuan: SQL injection lets admin-token holders read deleted document history","description":"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.","summary":"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.","severity":"medium","cvss":6.9,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["package","self-hosted","siyuan"],"not_affected_if":["single-user-desktop","version-3.8.7-or-later"],"how_to_check":"- Check the installed SiYuan version against `3.8.7`; anything older is in scope.\n- 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.\n- Rotate the SiYuan admin token if it may have been exposed to untrusted parties.","status":"open","published_at":"2026-10-25T14:16:56+00:00","first_seen_at":"2026-10-25T14:41:23+00:00","triaged_at":"2026-10-25T14:42:43+00:00","updated_at":"2026-10-25T14:42:43+00:00","category":"package","confidence":0.7,"triage":{"at":"2026-10-25T14:42:43Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade SiYuan to `v3.8.7` or later.\n- Rotate the SiYuan admin token if it may have been exposed to untrusted parties.","reach":"network","title":"SiYuan: SQL injection lets admin-token holders read deleted document history","impact":"medium","summary":"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.","category":"package","nicknames":[],"who_cares":["siyuan","self-hosted"],"confidence":0.7,"needs_auth":"yes","worst_case":"Attacker reads deleted document content, titles and paths from history.db.","analyst_note":"","how_to_check":"- Check the installed SiYuan version against `3.8.7`; anything older is in scope.\n- unknown for other checks; the sources do not name a config file or endpoint log to inspect.","needs_analyst":false,"not_affected_if":["version-3.8.7-or-later","single-user-desktop"],"who_is_affected":"Teams that run SiYuan on a server or share its API with others, where the admin token is held by more than one person or service. Single-user desktop installs where only the owner holds the token are much less exposed. unknown whether other configurations are affected beyond this.","user_interaction":"no","needs_special_setup":"unknown","severity_if_unknown":"unknown"},"cost_usd":0.000593,"input_tokens":3334,"output_tokens":519,"severity_before":"medium"},"analyst_status":null,"analyst_note":null,"search":"'-116170':15A,18A '-2026':14A,17A '3':91C 'admin':6A,50B,79C 'admin-token':5A,78C 'allow':77C 'attack':47B,94C 'contain':71C 'content':64B,110C 'craft':54B,97C 'cve':13A,16A 'delet':10A,62B,108C 'document':11A,63B,109C 'endpoint':40B,105C 'escap':29B 'exfiltr':107C 'expos':61B 'fail':27B 'gethistoryitem':104C 'histori':12A,39B 'history.db':60B,84C 'hold':48B 'holder':8A,81C 'host':22B 'inject':3A,43B,74C,86C 'let':4A 'op':31B,88C 'packag':19B 'path':67B,113C 'payload':57B,100C 'possibl':45B 'queri':34B,92C 'read':9A,59B,83C 'searchhistori':102C 'select':56B,99C 'self':21B 'self-host':20B 'send':96C 'sent':36B 'siyuan':1A,23B,24B,68C 'sql':2A,42B,73C 'titl':65B,111C 'token':7A,51B,80C 'type':33B,90C 'unescap':87C 'union':55B,98C 'use':53B 'v3.8.7':26B,70C 'valu':35B,93C 'vulner':75C","nicknames":[],"mitigations":[],"who_affected":"Teams that run SiYuan on a server or share its API with others, where the admin token is held by more than one person or service. Single-user desktop installs where only the owner holds the token are much less exposed. unknown whether other configurations are affected beyond this.","tier":"C","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-25T14:16:56+00:00","kev":null,"cvss_vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","cvss_by":"disclosure@vulncheck.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-116170","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-116170","severity":null,"published_at":"2026-10-25T14:16:56+00:00","modified_at":"2026-10-25T14:16:56+00:00","first_seen_at":"2026-10-25T14:41:23+00:00","fetched_at":"2026-10-25T14:41:23+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}