GHSA-7j72-f6wg-cxw6: SiYuan: auth bypass leaks password-protected doc content
GHSA-7j72-f6wg-cxw6HIGHSiYuan's publish mode lets an owner mark a document "protected" — publicly listed but gated behind a password on the primary read endpoint (getDoc) — yet half a dozen other content-returning endpoints (getHeadingChildrenDOM, the getHeading*Transaction handlers, getBacklinkDoc, getBackmentionDoc) never check that password, and a separate search endpoint leaks the internal block IDs those endpoints need. Any anonymous visitor to a public SiYuan publish instance can chain three unauthenticated requests to read the full body of a document its owner explicitly password-protected — a CVSS 8.6, confidentiality-only bypass (CWE-288) the reporter reproduced end-to-end on a live instance. There is no CISA KEV listing, no EPSS score, and no public exploit or Nuclei template yet, so this looks pre-weaponization rather than under active attack, but the PoC is three plain unauthenticated HTTP calls and the package has 2,997 downstream dependents against a middling OpenSSF Scorecard of 5.7/10. Patch to commit 2d069dce8 (or the first release built after 2026-07-21) on any instance running publish mode now, and until patched, disable publish mode or put a network-level auth gate (VPN/basic auth) in front of the publish port rather than relying on SiYuan's own password field.
What is the risk?
High confidentiality risk with low exploitation barrier: the attack requires no credentials, no user interaction, and only three sequential unauthenticated API calls against a service listening on a known port (6808). CVSS 8.6 (AV:N/AC:L/PR:N/UI:N) reflects that low complexity. Mitigating factors are that impact is confidentiality-only (no write/RCE path), it is not in CISA KEV, has no EPSS score, and no public exploit or scanner template currently exists — so real-world exploitation is plausible but not yet observed. The precondition (publish mode enabled with at least one "protected" document) narrows the exposed population but does not reduce severity for instances that meet it.
How does the attack unfold?
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| Jupyter Notebook | go | < 0.0.0-20260721020826-2d069dce84a2 | 0.0.0-20260721020826-2d069dce84a2 |
Do you use Jupyter Notebook? You're affected.
How severe is it?
What is the attack surface?
What should I do?
1 step1) Upgrade github.com/siyuan-note/siyuan/kernel to the patched commit 2d069dce84a25c959ef0093c72c98e05778ef218 or later (fixed range starts 0.0.0-20260721020826-2d069dce84a2). 2) Until patched, either disable publish mode entirely or place the publish port (6808) behind an additional authentication layer (reverse-proxy basic auth, VPN, IP allowlist) so anonymous internet access is not possible. 3) Re-evaluate any document currently marked "protected" as if it had been public during the exposure window, and rotate any credentials or sensitive data it contained. 4) For detection, review publish-mode access logs for anonymous calls to searchEmbedBlock, getHeadingChildrenDOM, getHeading*Transaction, or getBacklinkDoc/getBackmentionDoc without a valid session/password cookie, especially sequences hitting these endpoints shortly after a getDoc call returns the password-required placeholder. 5) After patching, confirm FilterContentByPublishAccess is enforced uniformly by testing the same three-step PoC against a protected test document.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is GHSA-7j72-f6wg-cxw6?
SiYuan's publish mode lets an owner mark a document "protected" — publicly listed but gated behind a password on the primary read endpoint (getDoc) — yet half a dozen other content-returning endpoints (getHeadingChildrenDOM, the getHeading*Transaction handlers, getBacklinkDoc, getBackmentionDoc) never check that password, and a separate search endpoint leaks the internal block IDs those endpoints need. Any anonymous visitor to a public SiYuan publish instance can chain three unauthenticated requests to read the full body of a document its owner explicitly password-protected — a CVSS 8.6, confidentiality-only bypass (CWE-288) the reporter reproduced end-to-end on a live instance. There is no CISA KEV listing, no EPSS score, and no public exploit or Nuclei template yet, so this looks pre-weaponization rather than under active attack, but the PoC is three plain unauthenticated HTTP calls and the package has 2,997 downstream dependents against a middling OpenSSF Scorecard of 5.7/10. Patch to commit 2d069dce8 (or the first release built after 2026-07-21) on any instance running publish mode now, and until patched, disable publish mode or put a network-level auth gate (VPN/basic auth) in front of the publish port rather than relying on SiYuan's own password field.
Is GHSA-7j72-f6wg-cxw6 actively exploited?
No confirmed active exploitation of GHSA-7j72-f6wg-cxw6 has been reported, but organizations should still patch proactively.
How to fix GHSA-7j72-f6wg-cxw6?
1) Upgrade github.com/siyuan-note/siyuan/kernel to the patched commit 2d069dce84a25c959ef0093c72c98e05778ef218 or later (fixed range starts 0.0.0-20260721020826-2d069dce84a2). 2) Until patched, either disable publish mode entirely or place the publish port (6808) behind an additional authentication layer (reverse-proxy basic auth, VPN, IP allowlist) so anonymous internet access is not possible. 3) Re-evaluate any document currently marked "protected" as if it had been public during the exposure window, and rotate any credentials or sensitive data it contained. 4) For detection, review publish-mode access logs for anonymous calls to searchEmbedBlock, getHeadingChildrenDOM, getHeading*Transaction, or getBacklinkDoc/getBackmentionDoc without a valid session/password cookie, especially sequences hitting these endpoints shortly after a getDoc call returns the password-required placeholder. 5) After patching, confirm FilterContentByPublishAccess is enforced uniformly by testing the same three-step PoC against a protected test document.
What systems are affected by GHSA-7j72-f6wg-cxw6?
This vulnerability affects the following AI/ML architecture patterns: Knowledge management / notes platforms, Content publishing / sharing endpoints, Self-hosted AI tool deployments feeding curated notes into downstream workflows.
What is the CVSS score for GHSA-7j72-f6wg-cxw6?
GHSA-7j72-f6wg-cxw6 has a CVSS v3.1 base score of 8.6 (HIGH).
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0025Exfiltration via Cyber MeansCompliance Controls Affected
What are the technical details?
Original Advisory
**CVE:** This vulnerability corresponds to [CVE-2026-68584](https://nvd.nist.gov/vuln/detail/CVE-2026-68584). ### Summary SiYuan's publish mode defines a "protected" access level: a document that is publicly listed but requires a password to read (per the product's own UI help text, protected = "Publicly visible, requires password to access"). The password is enforced on the primary content path (`getDoc`, via `FilterContentByPublishAccess`). Several other content-returning endpoints `getHeadingChildrenDOM`, `getHeadingDeleteTransaction`/`getHeadingLevelTransaction`/ `getHeadingInsertTransaction`, and `getBacklinkDoc`/`getBackmentionDoc` return rendered block DOM with **no password check at all**. Combined with reader-reachable endpoints that leak a protected document's internal block IDs, an anonymous reader can retrieve the full body of a password-protected document without the password. This has been reproduced end-to-end on a live instance. ### Details **The password control and where it is enforced.** Publish access has five levels encoded in `visible`/`password`/`disable`: public, protected (password), hidden, private (password), forbidden. `getDoc` correctly enforces the password for protected/private documents via `FilterContentByPublishAccess`. The bug is that other content endpoints do not. **Content endpoints with no password check (all `CheckAuth`-only):** - `getHeadingChildrenDOM` returns rendered DOM of a heading subtree. - `getHeadingDeleteTransaction`/`getHeadingLevelTransaction`/`getHeadingInsertTransaction` return rendered heading DOM in the computed transaction payload (no mutation occurs on this path). - `getBacklinkDoc`/`getBackmentionDoc` return rendered DOM of referencing blocks. None of these invokes the publish-password check that `getDoc` applies. Each converts a block ID into full rendered content regardless of the containing document's protected/password status. **The ID-leak that removes the precondition.** A protected document is, by design, publicly listed (`listDocsByPath` filters on `visible`, and protected documents are visible), so an anonymous reader obtains the document's root ID. The document's internal block/heading IDs are then obtainable from reader-reachable endpoints notably the `searchEmbedBlock` endpoint (reported separately), whose post-query filter `FilterEmbedBlocksByPublishAccess` **replaces the content string but retains the block ID**. So the "filtered" search still yields the protected document's internal heading IDs. (Other reader-reachable endpoints also leak block IDs, the vulnerability does not depend on any single ID source.) **The chain, reproduced on a live instance.** Against a real protected document (password set), an anonymous reader on port 6808 with no token and no password: 1. `getDoc(protectedDoc)` → returns the password-required placeholder (correctly blocked). 2. `searchEmbedBlock` with a statement selecting heading blocks for the document's root ID → returns the heading IDs (content filtered, IDs retained). 3. `getHeadingChildrenDOM(headingId)` → returns the full rendered body of the protected document, including its protected content. The password gate that step 1 enforces is entirely bypassed by step 3. ### Proof of Concept Reproduced on a local instance (SiYuan running locally, publish mode enabled on port 6808, publish Basic Auth disabled). Setup: a document marked "protected" with password, whose body contains the unique marker `TOP_SECRET_CRITICAL_123`. **1. Confirm the password gate blocks the primary path (anonymous, port 6808):** ``` POST http://127.0.0.1:6808/api/filetree/getDoc {"id":"PROTECTED_DOC"} ``` Returns the password-required placeholder correctly blocked. **2. Leak the protected document's heading ID (anonymous, port 6808):** ``` POST http://127.0.0.1:6808/api/search/searchEmbedBlock {"stmt":"SELECT * FROM blocks WHERE root_id='PROTECTED_DOC' AND type='h'"} ``` Returns heading blocks with their IDs; the content field is filtered but the block ID is retained. **3. Retrieve the protected content without the password (anonymous, port 6808):** ``` POST http://127.0.0.1:6808/api/block/getHeadingChildrenDOM {"id":"HEADING_ID"} ``` Returns HTTP 200 with the rendered body of the protected document, including `TOP_SECRET_CRITICAL_123` retrieved with no token and no password. `getHeadingDeleteTransaction`/`getHeadingLevelTransaction`/`getHeadingInsertTransaction` and `getBacklinkDoc`/ `getBackmentionDoc` provide the same password-free content retrieval given a block ID from the protected document. ### Impact An anonymous reader (publish mode with auth disabled) or any publish `RoleReader` can read the full content of a password-protected published document without the password, defeating the "protected" access control the product documents as a password gate. The core defect is that these content-returning endpoints perform no publish-password check; the ID-leak endpoints (multiple sources) supply the block IDs that make the bypass reachable anonymously and untargeted. Impact is confidentiality-only (content disclosure); no modification occurs on these paths. Encrypted notebooks are out of scope. ### Suggested fix Apply the publish-password/publish-access check that `getDoc` uses (`FilterContentByPublishAccess`/`IsReadOnlyRoleContext` plus the password-cookie check) to every content-returning endpoint: `getHeadingChildrenDOM`, the three `getHeading*Transaction` handlers, and `getBacklinkDoc`/`getBackmentionDoc`. Separately, `FilterEmbedBlocksByPublishAccess` should omit filtered blocks entirely rather than blanking the content while retaining the ID, so that filtered results cannot be used to enumerate a protected document's internal block IDs. The durable fix is to enforce the publish boundary in the shared render/DOM path rather than per-handler, since any content endpoint that omits the check reintroduces this class.
Exploitation Scenario
An attacker discovers a SiYuan publish instance exposed to the internet (e.g., via search-engine indexing or port scanning for 6808) and finds a document listed as password-protected. Instead of attempting to guess the password, they call the public listDocsByPath/search endpoint to learn the document's root ID, then send an unauthenticated POST to searchEmbedBlock with a SQL-like statement selecting heading blocks for that root ID — the response strips the protected content string but still returns the internal heading block IDs. The attacker then feeds one of those IDs into getHeadingChildrenDOM (or getBacklinkDoc/getBackmentionDoc), which returns the fully rendered DOM of that heading subtree with no password check at all, disclosing the protected document's real content. The entire chain is three scripted HTTP requests, requires no account, and can be automated to sweep every publicly-listed protected document on an instance.
Weaknesses (CWE)
CWE-288 — Authentication Bypass Using an Alternate Path or Channel: The product requires authentication, but the product has an alternate path or channel that does not require authentication.
- [Architecture and Design] Funnel all access through a single choke point to simplify how users can access a resource. For every access, perform a check to determine if the user has permissions to access the resource.
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:NReferences
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