Skip to main content

SiYuan CVE-2026-45147

| EUVDEUVD-2026-30360 MEDIUM
Improper Authorization (CWE-285)
2026-05-13 https://github.com/siyuan-note/siyuan GHSA-6r88-8v7q-q4p2
4.3
CVSS 3.1 · GitHub Advisory
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain low-privilege SiYuan session credential
  2. Delivery
    Authenticate via POST /api/system/loginAuth
  3. Exploit
    POST /api/tag/getTag with crafted sort parameter
  4. Execution
    Bypass absent CheckAdminRole and CheckReadonly middleware
  5. Persist
    Trigger model.Conf.Save() full config rewrite
  6. Impact
    Unauthorized configuration mutation persisted to conf.json on disk

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V8 - Authorization Authorization verification
MITRE ATT&CK

1 technique across 1 tactic: Defense Evasion

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires an active authenticated session with any role that passes model.CheckAuth - this explicitly includes RoleReader accounts used by the SiYuan publish service (the default role for anonymous publish visitors) and RoleEditor accounts on workspaces where the administrator has enabled Editor.ReadOnly = true. No admin or elevated privileges are required beyond basic session authentication (PR:L per CVSS vector). The attacker must have network access to the SiYuan HTTP API port (default 6806). Exploitation is limited by the SSVC 'automatable: no' designation - mass automated targeting is not feasible because each exploit attempt requires established session management rather than a single stateless request. The direct impact is constrained to mutating the Conf.Tag.Sort integer field; broader configuration damage requires successfully racing Conf.Save() against a concurrent legitimate admin write, which is circumstantial rather than reliably triggerable.

Impact

The CVSS 4.3 Medium score (AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N) accurately reflects network-reachable exploitation requiring only low-privilege authentication, with limited integrity impact and no confidentiality or availability impact on the primary write path. EPSS at 0.03% (8th percentile) signals very low near-term exploitation probability in the wild, consistent with the narrow scope of damage (only Conf.Tag.Sort is the directly writable field). SSVC designates exploitation as 'poc' (publicly available code), technical impact as 'partial', and automatable as 'no' - meaning mass automated scanning is not feasible and exploitation requires manual, session-authenticated targeting. The vulnerability is not in CISA KEV. The primary real-world concern is the architectural trust-boundary violation: RoleReader accounts, intended as read-only publish-service principals, can mutate server-side state - a violation that is architecturally significant even if the immediate writable surface is small. The secondary TOCTOU concern during Conf.Save() is real but difficult to reliably exploit without concurrent admin activity. Overall, this is a low-urgency, genuine access control defect warranting patching but not emergency response for most deployments.

Exploit ScenarioDerived

An attacker with a low-privilege RoleReader publish-service credential - including credentials issued to anonymous publish visitors - authenticates to /api/system/loginAuth and issues a POST request to /api/tag/getTag with a crafted sort parameter (e.g., {"sort": 7}). The server bypasses the absent CheckAdminRole and CheckReadonly guards, writes the new value to the global configuration object, and calls Conf.Save(), persisting the change to <workspace>/conf/conf.json. A working curl-based PoC demonstrating this full sequence - including before/after confirmation of the persisted mutation - is publicly available in the security advisory.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 08, 2026

Broken access control in SiYuan's /api/tag/getTag endpoint (versions prior to 3.7.0) allows any authenticated low-privilege user - including publish-service RoleReader accounts and RoleEditor accounts on read-only workspaces - to mutate the global Conf.Tag.Sort configuration value and trigger a full rewrite of the workspace conf.json file. The handler silently executes a privileged write operation (model.Conf.Save()) when a sort argument is present, despite the endpoint being registered with only model.CheckAuth middleware, omitting the model.CheckAdminRole and model.CheckReadonly guards that sibling write endpoints correctly enforce. Publicly available exploit code exists per SSVC assessment, though no active exploitation has been confirmed (not in CISA KEV; EPSS 0.03%).

RemediationAI

Upgrade SiYuan to version 3.7.0 or later, which includes the upstream fix at Go package version 0.0.0-20260512140701-d7b77d945e0d as documented in GHSA-6r88-8v7q-q4p2 (https://github.com/siyuan-note/siyuan/security/advisories/GHSA-6r88-8v7q-q4p2). For deployments unable to patch immediately, restrict network access to the SiYuan API port (default 6806) using a host-based firewall or reverse proxy configured to permit only trusted administrator IP addresses - this mitigates the vulnerability at the cost of disabling publish-mode and remote access for all users. A narrower workaround is to disable publish-service functionality entirely if RoleReader accounts are not operationally required, preventing low-privilege sessions from being established; however, this does not protect against RoleEditor accounts on read-only workspaces. No application-layer workaround short of patching fully addresses the missing middleware guards.

Affected VersionsENISA

SiYuan < 3.7.0
SiYuan < 3.7.0

Affected Packages

go github.com/siyuan-note/siyuan/kernel fix: 0.0.0-20260512140701-d7b77d945e0d
euvd siyuan fix: 3.7.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in go, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

SiYuan is a self-hosted personal knowledge management application whose backend is a Go-based HTTP API server (pkg:go/github.com/siyuan-note/siyuan/kernel) using the Gin web framework with role-based middleware guards. The root cause is CWE-285 (Improper Authorization): kernel/api/router.go:170 registers POST /api/tag/getTag with only model.CheckAuth, omitting model.CheckAdminRole and model.CheckReadonly that sibling endpoints renameTag and removeTag on lines 171-172 correctly apply. Inside kernel/api/tag.go:28-64, when the sort argument is non-nil, the handler writes to the global model.Conf.Tag.Sort and calls model.Conf.Save(), which atomically rewrites the entire <workspace>/conf/conf.json. Because Conf.Save() persists the complete configuration object, a write race against a concurrent legitimate admin change introduces a secondary TOCTOU risk on unrelated configuration fields. This is the same missing-guard pattern as the previously patched GHSA-4j3x-hhg2-fm2x (/api/template/renderSprig), indicating a systemic rather than isolated defect.

Know when Docker gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

GitHub Advisory PRIMARY 4.3 MEDIUM
AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N
SUSE MEDIUM

Primary rating from GitHub Advisory.

CVSS VectorGitHub Advisory

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
None

DescriptionGitHub Advisory

Summary

POST /api/tag/getTag is registered with model.CheckAuth only, omitting both model.CheckAdminRole and model.CheckReadonly, despite the handler performing a configuration write that is normally guarded by both. Any authenticated user - including publish-service RoleReader accounts and RoleEditor accounts on a read-only workspace - can call this endpoint with a sort argument to mutate model.Conf.Tag.Sort and trigger model.Conf.Save(), which atomically rewrites the entire workspace conf.json.

Same root-cause class as the patched GHSA-4j3x-hhg2-fm2x (which fixed missing CheckAdminRole + CheckReadonly on /api/template/renderSprig).

Details

Affected files / lines (v3.6.5):

kernel/api/router.go:170 - only CheckAuth:

go
ginServer.Handle("POST", "/api/tag/getTag", model.CheckAuth, getTag)
// Compare the sibling registrations on the next two lines, which DO gate writes:
ginServer.Handle("POST", "/api/tag/renameTag", model.CheckAuth, model.CheckAdminRole, model.CheckReadonly, renameTag)
ginServer.Handle("POST", "/api/tag/removeTag", model.CheckAuth, model.CheckAdminRole, model.CheckReadonly, removeTag)

kernel/api/tag.go:28-64 - handler. The if nil != arg["sort"] block writes config without any role check:

go
func getTag(c *gin.Context) {
    ret := gulu.Ret.NewResult()
    defer c.JSON(http.StatusOK, ret)
    arg, ok := util.JsonArg(c, ret)
    if !ok { return }
    ...
    if nil != arg["sort"] {                    // ← unauthorized write path
        sortVal, ok := util.ParseJsonArg[float64]("sort", arg, ret, true, false)
        if !ok { return }
        model.Conf.Tag.Sort = int(sortVal)
        model.Conf.Save()                      // persists entire conf to <workspace>/conf/conf.json
    }
    ...
}

Conf.Save() rewrites the entire configuration file, which means a malicious caller racing with a legitimate config change can roll back another user's setting (TOCTOU on the global config object).

PoC

Same Docker setup as Advisory 1.

bash
# 1. Authenticate (any role with CheckAuth pass - admin used here for convenience).
curl -s -c /tmp/sy.cookie -X POST http://127.0.0.1:6806/api/system/loginAuth \
  -H 'Content-Type: application/json' -d '{"authCode":"audittest"}' >/dev/null
# 2. Read current Conf.Tag.Sort.
curl -s -b /tmp/sy.cookie -X POST http://127.0.0.1:6806/api/system/getConf \
  -H 'Content-Type: application/json' -d '{}' \
  | python3 -c "import json,sys;print('Conf.Tag.Sort BEFORE =',json.load(sys.stdin)['data']['conf']['tag']['sort'])"
# → Conf.Tag.Sort BEFORE = 4
# 3. Mutate via the read-style endpoint.
curl -s -b /tmp/sy.cookie -X POST http://127.0.0.1:6806/api/tag/getTag \
  -H 'Content-Type: application/json' -d '{"sort": 7}'
# → {"code":0,"msg":"","data":[]}
# 4. Confirm in-memory.
curl -s -b /tmp/sy.cookie -X POST http://127.0.0.1:6806/api/system/getConf \
  -H 'Content-Type: application/json' -d '{}' \
  | python3 -c "import json,sys;print('Conf.Tag.Sort AFTER =',json.load(sys.stdin)['data']['conf']['tag']['sort'])"
# → Conf.Tag.Sort AFTER = 7
# 5. Confirm persisted to disk inside the container.
docker exec siyuan-audit grep -o 'sort":[0-9]*' /siyuan/workspace/conf/conf.json
# → sort":7

The vulnerability is exposed to publish-mode RoleReader (default for any anonymous publish visitor) and to RoleEditor users on workspaces where the administrator has set Editor.ReadOnly = true.

Impact

Limited direct damage - the writable field is only the tag display sort order. The pattern is concerning because:

  • It demonstrates the same gap that GHSA-4j3x-hhg2-fm2x was meant to flag broadly (missing CheckAdminRole + CheckReadonly on a read-style endpoint that performs writes); each occurrence has to be patched individually.
  • Conf.Save() rewrites the whole file, so a write-race during a legitimate configuration change can overwrite unrelated user-set values.
  • A publish-service Reader being able to mutate any server state at all violates the intended trust boundary.

Threat Intelligence Overview

EPSS Score
0.0%
Top 92% exploitable
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

22
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +22
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

More in Docker

View all
CVE-2024-55964 CRITICAL POC
9.8 Mar 26

An issue was discovered in Appsmith before 1.52. Rated critical severity (CVSS 9.8), this vulnerability is remotely expl

CVE-2019-5736 HIGH POC
8.6 Feb 11

runc through version 1.0-rc6 (used in Docker before 18.09.2) contains a container escape vulnerability that allows attac

CVE-2023-32077 HIGH POC
7.5 Aug 24

Netmaker makes networks with WireGuard. Rated high severity (CVSS 7.5), this vulnerability is remotely exploitable, no a

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2023-5815 HIGH POC
8.1 Nov 22

The News & Blog Designer Pack - WordPress Blog Plugin - (Blog Post Grid, Blog Post Slider, Blog Post Carousel, Blog Post

CVE-2026-66384 MEDIUM POC
5.3 Aug 12

Path traversal in JFrog Artifactory (CWE-22) enables an authenticated low-privilege user to write data outside the inten

CVE-2014-9357 CRITICAL
10.0 Dec 16

Docker 1.3.2 allows remote attackers to execute arbitrary code with root privileges via a crafted (1) image or (2) build

CVE-2026-52806 CRITICAL POC
9.9 Jun 23

Remote code execution in Gogs through 0.14.2 allows authenticated users (and unauthenticated attackers on default-config

CVE-2025-14707 HIGH POC
8.9 Dec 15

Unauthenticated remote command injection in SGWBOX N3 firmware 2.0.25 lets attackers execute arbitrary operating-system

CVE-2026-56274 HIGH POC
8.7 Jun 23

Remote code execution in Flowise before 3.1.2 allows any authenticated user (or API caller with chatflow view/update per

CVE-2026-34156 CRITICAL POC
9.9 Mar 30

Remote code execution in NocoBase Workflow Script Node (npm @nocobase/plugin-workflow-javascript) allows authenticated l

CVE-2019-15752 HIGH POC
7.8 Aug 28

Docker Desktop Community Edition before 2.1.0.1 allows local users to gain privileges by placing a Trojan horse docker-c

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
SUSE Linux Enterprise Server 16.1 Affected
SUSE Linux Enterprise Server for SAP applications 16.1 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP5 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP6 Affected
openSUSE Leap 15.5 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy