CVE-2026-72812: SiYuan: broken auth on refreshBacklink enables DoS
GHSA-wgwx-479j-23vqMEDIUMPoC AVAILABLESiYuan's `/api/ref/refreshBacklink` endpoint is missing the authorization guard that every other write-capable route in the codebase carries, so a low-privilege reader — or an unauthenticated anonymous session when publish auth is disabled — can trigger a full transaction-queue flush, a global reference scan, and disk-level parsing of arbitrary documents with a single unauthenticated POST. With 2,997 downstream dependents and an EPSS score in the top 81% most-likely-to-be-exploited percentile, the exposure is broad even though there is no public exploit code or Nuclei template yet and it is not in CISA KEV. The practical risk is resource-exhaustion denial of service and a read-only invariant bypass rather than data theft or code execution — CVSS 6.5 with integrity-low and availability-low, no confidentiality impact, reflects that the attacker controls only whether the write happens, not its content. Patch to the fixed commit (`7d273c271ce1`, released 2026-07-23) on any internet-facing SiYuan publish deployment; until then, disable publish mode or enforce `Publish.Auth.Enable=true` and rate-limit `/api/ref/*` at the reverse proxy to blunt repeated-call amplification.
What is the risk?
Medium severity (CVSS 6.5) driven by trivial exploitability (network, low complexity, no privileges beyond reader/anonymous, no user interaction) offset by limited impact scope (integrity-low, availability-low, no confidentiality loss). EPSS sits in the top 81% most-likely-to-be-exploited percentile, which is notable for a medium-severity bug and suggests scanners may pick it up quickly once broader awareness spreads, but there is no public PoC weaponized beyond the advisory's reproduction steps, no Nuclei template, and no KEV listing today. Exposure is gated by whether SiYuan's publish feature (port 6808) is internet-facing and whether publish auth is enabled — instances with publish mode off or properly authenticated are not reachable by this path. The real-world risk is best characterized as an unauthenticated resource-amplification/DoS primitive against self-hosted knowledge bases, not a data-breach or RCE vector.
How does the attack unfold?
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| Jupyter Notebook | go | < 0.0.0-20260723002528-7d273c271ce1 | 0.0.0-20260723002528-7d273c271ce1 |
Do you use Jupyter Notebook? You're affected.
How severe is it?
What is the attack surface?
What should I do?
1 step1) Upgrade SiYuan kernel to the patched build at or after commit
7d273c271ce1(2026-07-23) — this is the primary and only complete fix. 2) If immediate patching isn't possible, disable the publish feature or setPublish.Auth.Enable=truewith a strong Basic Auth credential so anonymous/reader access to port 6808 is closed. 3) Place a reverse proxy or WAF in front of/api/ref/refreshBacklink(and/api/ref/*generally) with aggressive rate limiting per source IP to blunt the resource-amplification effect even pre-patch. 4) Detection: monitor for repeated POSTs to/api/ref/refreshBacklinkfrom anonymous or reader-tier sessions, unusual transaction-queue flush frequency, or CPU/disk I/O spikes correlated with publish-port traffic. 5) Post-patch, verify the endpoint now returns 403 for reader/anonymous sessions, mirroring therenameTag/foldBlockcontrols described in the advisory's PoC.
What does CISA's SSVC say?
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2026-72812?
SiYuan's `/api/ref/refreshBacklink` endpoint is missing the authorization guard that every other write-capable route in the codebase carries, so a low-privilege reader — or an unauthenticated anonymous session when publish auth is disabled — can trigger a full transaction-queue flush, a global reference scan, and disk-level parsing of arbitrary documents with a single unauthenticated POST. With 2,997 downstream dependents and an EPSS score in the top 81% most-likely-to-be-exploited percentile, the exposure is broad even though there is no public exploit code or Nuclei template yet and it is not in CISA KEV. The practical risk is resource-exhaustion denial of service and a read-only invariant bypass rather than data theft or code execution — CVSS 6.5 with integrity-low and availability-low, no confidentiality impact, reflects that the attacker controls only whether the write happens, not its content. Patch to the fixed commit (`7d273c271ce1`, released 2026-07-23) on any internet-facing SiYuan publish deployment; until then, disable publish mode or enforce `Publish.Auth.Enable=true` and rate-limit `/api/ref/*` at the reverse proxy to blunt repeated-call amplification.
Is CVE-2026-72812 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2026-72812, increasing the risk of exploitation.
How to fix CVE-2026-72812?
1) Upgrade SiYuan kernel to the patched build at or after commit `7d273c271ce1` (2026-07-23) — this is the primary and only complete fix. 2) If immediate patching isn't possible, disable the publish feature or set `Publish.Auth.Enable=true` with a strong Basic Auth credential so anonymous/reader access to port 6808 is closed. 3) Place a reverse proxy or WAF in front of `/api/ref/refreshBacklink` (and `/api/ref/*` generally) with aggressive rate limiting per source IP to blunt the resource-amplification effect even pre-patch. 4) Detection: monitor for repeated POSTs to `/api/ref/refreshBacklink` from anonymous or reader-tier sessions, unusual transaction-queue flush frequency, or CPU/disk I/O spikes correlated with publish-port traffic. 5) Post-patch, verify the endpoint now returns 403 for reader/anonymous sessions, mirroring the `renameTag`/`foldBlock` controls described in the advisory's PoC.
What systems are affected by CVE-2026-72812?
This vulnerability affects the following AI/ML architecture patterns: self-hosted knowledge management platforms, publicly-published documentation/wiki backends feeding AI-assisted workflows.
What is the CVSS score for CVE-2026-72812?
CVE-2026-72812 has a CVSS v3.1 base score of 6.5 (MEDIUM). The EPSS exploitation probability is 0.38%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0029Denial of AI ServiceAML.T0049Exploit Public-Facing ApplicationCompliance Controls Affected
What are the technical details?
Original Advisory
**CVE:** This vulnerability corresponds to [CVE-2026-72812](https://nvd.nist.gov/vuln/detail/CVE-2026-72812). ### Summary The `/api/ref/refreshBacklink` endpoint is gated by `CheckAuth` only. Unlike its mutating siblings, it carries no `CheckAdminRole`, no `CheckReadonly`, and no inline reader-role guard so it falls through all three authorization mechanisms the codebase uses to protect write operations. A publish `RoleReader` or the anonymous account when `Publish.Auth.Enable` is `false` can invoke it, forcing the server to flush its pending write-transaction queue, scan all references globally, load and parse referencing trees from disk, and enqueue database writes. This violates the read-only invariant (it writes even in a globally read-only workspace), provides an unauthenticated resource-amplification/DoS primitive, and applies no per-object access check to the caller-supplied ID. ### Details **Route / auth tier.** `router.go`: `Handle("POST", "/api/ref/refreshBacklink", model.CheckAuth, refreshBacklink)`, `CheckAuth` only. `CheckAuth` admits `RoleReader`; the publish proxy forwards port-6808 traffic with a Reader JWT (anonymous account when publish auth is disabled). Anonymous/reader reachable. **Guard fall-through.** SiYuan protects write handlers with one of three mechanisms: route-level `CheckAdminRole` (AV/riff/repo/sync/setting/snippet/notebook mutations), route-level `CheckReadonly` (filetree/block/attr/tag mutations), or an inline `IsReadOnlyRoleContext` check (e.g. `updateEmbedBlock`, `updateRecentDoc*Time`). `refreshBacklink` has none of the three. **Write path reached.** `refreshBacklink` calls `model.RefreshBacklink(id)`: - `FlushTxQueue()` — forces the pending write-transaction queue to disk. - `refreshRefsByDefID(defID)` → `QueryRefsByDefID(defID)` (global scan with encrypted-box fallback loop) → `filesys.LoadTrees(rootIDs)` (disk read and Lute parse of every referencing tree) → `sql.UpdateRefsTreeQueue(tree)` (enqueues DB writes) → ref-count task update. The handler also does not consult `util.ReadOnly`, so it executes its writes even when the workspace is configured globally read-only. **No per-object authorization.** `defID` is attacker-controlled and receives no publish-access or ownership check, so a reader can force a reference reindex of any document, including publish-forbidden/unpublished ones (cross-scope). ### Proof of Concept Reproduced on a local instance (SiYuan running locally, publish mode enabled on port 6808, publish Basic Auth disabled), as an anonymous reader (no token): **Target endpoint executes the full write path:** ``` POST http://127.0.0.1:6808/api/ref/refreshBacklink {"id":"<any block id>"} ``` Returns `{"code":0,"msg":"","data":null}` HTTP 200 the handler ran to completion, flushing the transaction queue and enqueuing ref writes. **Controls: the guarded mutating siblings correctly reject the same anonymous session:** ``` POST http://127.0.0.1:6808/api/tag/renameTag → 403 (CheckAdminRole and CheckReadonly) POST http://127.0.0.1:6808/api/block/foldBlock → 403 POST http://127.0.0.1:6808/api/block/updateEmbedBlock → code 0 no-op (inline IsReadOnlyRoleContext blocks the write) ``` The 200-vs-403 contrast confirms `refreshBacklink` is reachable and executes where its siblings are blocked. ### Impact An anonymous reader (publish mode with auth disabled) or any publish `RoleReader` can: - **Bypass the read-only invariant:** trigger persistent server-side writes (transaction-queue flush and reference reindex), including in a workspace configured globally read-only. - **Amplify resource use without authentication:** each call forces a transaction flush, a global reference scan, and disk read and parse of every referencing tree, with an attacker-controlled `id` and no rate limiting, a DoS primitive. - **Act cross-scope:** `defID` receives no publish-access check, so a reader can force reindexing of documents outside their publish scope. This is an integrity-invariant violation and a resource-amplification vector, not data corruption or injection, the caller cannot control the content of the writes, only trigger them. Impact is integrity-low and availability-low; no confidentiality impact and no attacker-controlled data reaches storage. ### Suggested fix Apply the same guard its mutating siblings use, add `CheckReadonly` (and `CheckAdminRole` if reference refresh is intended to be an authenticated operation) to the route, or an inline `IsReadOnlyRoleContext` check consistent with `updateEmbedBlock`. The endpoint should also honor `util.ReadOnly` and apply a publish-access check to `defID` so a reader cannot force cross-scope reindexing. More broadly, the three-way guard strategy (route middleware vs. inline check vs. none) is what allowed this handler to receive no gate at all; a structural backstop, a role-scoped route group for the mutation surface would prevent recurrence.
Exploitation Scenario
An organization runs SiYuan in publish mode to share a curated knowledge base externally (e.g., team wiki, documentation portal, or notes feeding an internal AI assistant), with publish Basic Auth left disabled for convenience. An attacker with no credentials sends repeated `POST /api/ref/refreshBacklink` requests with varying `id` values scraped from the publicly rendered pages. Each request forces the server to flush its write-transaction queue, scan all references, and load/parse referencing trees from disk — with no rate limit, a handful of concurrent scripted requests degrade response times for legitimate readers and, at scale, exhaust CPU/I/O on the host. Because the endpoint bypasses the workspace's read-only setting, this also silently mutates internal reference-count state even on instances explicitly configured as read-only, undermining any assumption that the published copy is immutable — relevant if that read-only guarantee was itself part of a data-integrity or compliance control.
Weaknesses (CWE)
CWE-862 — Missing Authorization: The product does not perform an authorization check when an actor attempts to access a resource or perform an action.
- [Architecture and Design] Divide the product into anonymous, normal, privileged, and administrative areas. Reduce the attack surface by carefully mapping roles with data and functionality. Use role-based access control (RBAC) [REF-229] to enforce the roles at the appropriate boundaries. Note that this approach may not protect against horizontal authorization, i.e., it will not protect a user from attacking others with the same role.
- [Architecture and Design] Ensure that access control checks are performed related to the business logic. These checks may be different than the access control checks that are applied to more generic resources such as files, connections, processes, memory, and database records. For example, a database may restrict access for medical records to a specific database user, but each record might only be intended to be accessible to the patient and the patient's doctor [REF-7].
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:LReferences
Timeline
Related Vulnerabilities
CVE-2026-7281110.0SiYuan: SQL injection enables cross-notebook DB access
Same package: notebookCVE-2026-6908510.0SiYuan: SQL injection in searchDocs allows DB tampering
Same package: notebookCVE-2026-6908410.0SiYuan: SQL injection in search endpoint exposes notebooks
Same package: notebookCVE-2026-6908310.0SiYuan: unauthenticated SQLi in full-text search endpoint
Same package: notebookCVE-2026-11105710.0Mercury: regex blocklist bypass allows unauthenticated RCE
Same package: notebook