{
    "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-34605",
        "tracking": {
            "current_release_date": "2026-04-03T16:30:51.727171Z",
            "generator": {
                "date": "2026-02-17T15:00:00Z",
                "engine": {
                    "name": "V.E.L.M.A",
                    "version": "1.7"
                }
            },
            "id": "CVE-2026-34605",
            "initial_release_date": "2026-03-31T22:26:11.923392Z",
            "revision_history": [
                {
                    "date": "2026-03-31T22:26:11.923392Z",
                    "number": "1",
                    "summary": "CVE created.| Source created.| CVE status created. (valid)| Description created for source.| CVSS created.| References created (3).| CWES updated (1)."
                },
                {
                    "date": "2026-03-31T22:26:13.632207Z",
                    "number": "2",
                    "summary": "NCSC Score created."
                },
                {
                    "date": "2026-03-31T22:40:07.706752Z",
                    "number": "3",
                    "summary": "Source created.| CVE status created. (valid)| Description created for source.| CVSS created.| Products created (1).| References created (3).| CWES updated (1)."
                },
                {
                    "date": "2026-03-31T22:40:10.165696Z",
                    "number": "4",
                    "summary": "NCSC Score updated."
                },
                {
                    "date": "2026-04-01T01:03:14.373511Z",
                    "number": "5",
                    "summary": "Source created.| CVE status created. (valid)| Description created for source.| CVSS created.| References created (4).| CWES updated (1)."
                },
                {
                    "date": "2026-04-01T01:03:30.579567Z",
                    "number": "6",
                    "summary": "NCSC Score updated."
                },
                {
                    "date": "2026-04-01T06:00:54.114428Z",
                    "number": "7",
                    "summary": "Source created.| CVE status created. (valid)| Description created for source.| CVSS created.| Products created (1).| Exploits created (1).| References created (2).| CWES updated (1)."
                },
                {
                    "date": "2026-04-01T06:00:57.675822Z",
                    "number": "8",
                    "summary": "NCSC Score updated."
                },
                {
                    "date": "2026-04-01T06:01:08.802362Z",
                    "number": "9",
                    "summary": "Source created.| CVE status created. (valid)| Description created for source.| CVSS created.| Products connected (1).| Exploits created (1).| References created (2).| CWES updated (1)."
                },
                {
                    "date": "2026-04-01T07:49:55.769267Z",
                    "number": "10",
                    "summary": "NCSC Score updated."
                },
                {
                    "date": "2026-04-01T15:06:24.723333Z",
                    "number": "11",
                    "summary": "Source connected.| CVE status created. (valid)| EPSS created."
                },
                {
                    "date": "2026-04-01T15:08:04.985385Z",
                    "number": "12",
                    "summary": "NCSC Score updated."
                },
                {
                    "date": "2026-04-01T19:38:43.252922Z",
                    "number": "13",
                    "summary": "Unknown change."
                },
                {
                    "date": "2026-04-02T14:58:59.021522Z",
                    "number": "14",
                    "summary": "EPSS updated."
                },
                {
                    "date": "2026-04-02T14:59:12.786578Z",
                    "number": "15",
                    "summary": "NCSC Score updated."
                },
                {
                    "date": "2026-04-03T16:25:57.002127Z",
                    "number": "16",
                    "summary": "CVSS created.| Products created (1).| Product Identifiers created (1).| Exploits created (1)."
                },
                {
                    "date": "2026-04-03T16:26:03.660035Z",
                    "number": "17",
                    "summary": "NCSC Score updated."
                }
            ],
            "status": "interim",
            "version": "17"
        }
    },
    "product_tree": {
        "branches": [
            {
                "branches": [
                    {
                        "branches": [
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/>=3.6.0|<3.6.2",
                                "product": {
                                    "name": "vers:unknown/>=3.6.0|<3.6.2",
                                    "product_id": "CSAFPID-5992478",
                                    "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.0|<3.6.2",
                                "product": {
                                    "name": "vers:unknown/>=3.6.0|<3.6.2",
                                    "product_id": "CSAFPID-5969659"
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/unknown",
                                "product": {
                                    "name": "vers:unknown/unknown",
                                    "product_id": "CSAFPID-5970654"
                                }
                            }
                        ],
                        "category": "product_name",
                        "name": "siyuan"
                    }
                ],
                "category": "vendor",
                "name": "siyuan-note"
            }
        ]
    },
    "vulnerabilities": [
        {
            "cve": "CVE-2026-34605",
            "cwe": {
                "id": "CWE-79",
                "name": "Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')"
            },
            "notes": [
                {
                    "category": "description",
                    "text": "SiYuan is a personal knowledge management system. From version 3.6.0 to before version 3.6.2, the SanitizeSVG function introduced in version 3.6.0 to fix XSS in the unauthenticated /api/icon/getDynamicIcon endpoint can be bypassed by using namespace-prefixed element names such as <x:script xmlns:x=\"http://www.w3.org/2000/svg\">. The Go HTML5 parser records the element's tag as \"x:script\" rather than \"script\", so the tag check passes it through. The SVG is served with Content-Type: image/svg+xml and no Content Security Policy; when a browser opens the response directly, its XML parser resolves the prefix to the SVG namespace and executes the embedded script. This issue has been patched in version 3.6.2.",
                    "title": "nvd - https://services.nvd.nist.gov/rest/json/cves/2.0?cveId=CVE-2026-34605"
                },
                {
                    "category": "description",
                    "text": "SiYuan is a personal knowledge management system. From version 3.6.0 to before version 3.6.2, the SanitizeSVG function introduced in version 3.6.0 to fix XSS in the unauthenticated /api/icon/getDynamicIcon endpoint can be bypassed by using namespace-prefixed element names such as <x:script xmlns:x=\"http://www.w3.org/2000/svg\">. The Go HTML5 parser records the element's tag as \"x:script\" rather than \"script\", so the tag check passes it through. The SVG is served with Content-Type: image/svg+xml and no Content Security Policy; when a browser opens the response directly, its XML parser resolves the prefix to the SVG namespace and executes the embedded script. This issue has been patched in version 3.6.2.",
                    "title": "cveprojectv5 - https://raw.githubusercontent.com/CVEProject/cvelistV5/main/cves/2026/34xxx/CVE-2026-34605.json"
                },
                {
                    "category": "description",
                    "text": "### Summary\n\nThe `SanitizeSVG` function introduced in v3.6.0 to fix XSS in the unauthenticated `/api/icon/getDynamicIcon` endpoint can be bypassed by using namespace-prefixed element names such as `<x:script xmlns:x=\"http://www.w3.org/2000/svg\">`. The Go HTML5 parser records the element's tag as `\"x:script\"` rather than `\"script\"`, so the tag check passes it through. The SVG is served with `Content-Type: image/svg+xml` and no Content Security Policy; when a browser opens the response directly, its XML parser resolves the prefix to the SVG namespace and executes the embedded script.\n\n### Details\n\nThe `getDynamicIcon` route is registered without authentication:\n\n```go\n// kernel/server/serve.go\nginServer.Handle(\"GET\", \"/api/icon/getDynamicIcon\", getDynamicIcon)\n```\n\nFor type 8, the `content` query parameter is inserted directly into an SVG `<text>` element using `fmt.Sprintf` with no HTML encoding:\n\n```go\n// kernel/api/icon.go:579-584\nreturn fmt.Sprintf(`\n    <svg id=\"dynamic_icon_type8\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n        <path d=\"...\"/>\n        <text x=\"50%%\" y=\"55%%\" ...>%s</text>\n    </svg>`, ..., content)\n```\n\n`SanitizeSVG` then parses the SVG with `github.com/88250/lute/html` and removes elements whose lowercased tag name matches a fixed list:\n\n```go\n// kernel/util/misc.go:249-252\ntag := strings.ToLower(c.Data)\nif tag == \"script\" || tag == \"iframe\" || tag == \"object\" || tag == \"embed\" ||\n    tag == \"foreignobject\" || \"animate\" == tag || ... {\n    n.RemoveChild(c)\n```\n\nThe lute HTML parser stores the full qualified name including any namespace prefix in `Node.Data`. A payload like `<x:script xmlns:x=\"http://www.w3.org/2000/svg\">` gets `Data = \"x:script\"`. The check `tag == \"script\"` is false, so the element is not removed and survives in the rendered output.\n\nConfirmed with the same library version used by SiYuan:\n\n```\nhtml.Parse input:  <x:script xmlns:x=\"http://www.w3.org/2000/svg\">alert(1)</x:script>\nNode.Data result:  \"x:script\"   (not \"script\")\nRemoved by check:  false\nRendered output:   <x:script xmlns:x=\"http://www.w3.org/2000/svg\">alert(1)</x:script>\n```\n\nThe same bypass works for every element on the blocklist: `x:iframe`, `x:object`, `x:foreignObject`, etc.\n\nThe fix is to strip the namespace prefix before comparing:\n\n```go\nlocalName := tag\nif i := strings.LastIndex(tag, \":\"); i >= 0 {\n    localName = tag[i+1:]\n}\nif localName == \"script\" || localName == \"iframe\" || ...\n```\n\n### PoC\n\n```\nGET /api/icon/getDynamicIcon?type=8&color=red&content=%3C%2Ftext%3E%3Cx%3Ascript%20xmlns%3Ax%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3Ealert%28document.domain%29%3C%2Fx%3Ascript%3E%3Ctext%3E HTTP/1.1\nHost: 127.0.0.1:6806\n```\n\nDecoded `content` value:\n```\n</text><x:script xmlns:x=\"http://www.w3.org/2000/svg\">alert(document.domain)</x:script><text>\n```\n\nThe response is a valid SVG with the script element intact. Opening the URL directly in a browser triggers the alert, confirming script execution at the SiYuan server origin.\n\n### Impact\n\nAny user whose SiYuan instance is reachable over a local network is exposed. An attacker on the same network can craft the URL and share it. When the victim opens it in a browser, JavaScript executes at the `http://<siyuan-host>:6806` origin. Because SiYuan sets `Access-Control-Allow-Origin: *` and the script runs same-origin, it can call any API endpoint using the victim's existing session cookies, including endpoints to read all notes, export data, or modify settings. No authentication or prior access is needed to construct the payload.",
                    "title": "github - https://api.github.com/advisories/GHSA-73g7-86qr-jrg3"
                },
                {
                    "category": "description",
                    "text": "SiYuan Note through version 3.6.1 is vulnerable to unauthenticated reflected Cross-Site Scripting (XSS) in the `/api/icon/getDynamicIcon` endpoint due to improper filtering of SVG elements with a namespace prefix (such as `<x:script>`). By using a namespaced script element, attackers can bypass the `SanitizeSVG` function and execute arbitrary JavaScript in the victim’s browser upon visiting a crafted link.\n",
                    "title": "nucleitemplates - https://github.com/projectdiscovery/nuclei-templates/raw/d4af2ef6978eeb1a1172e6a86a456fc949a16a4d/http%2Fcves%2F2026%2FCVE-2026-34605.yaml"
                },
                {
                    "category": "description",
                    "text": "SiYuan Note through version 3.6.1 is vulnerable to unauthenticated reflected Cross-Site Scripting (XSS) in the `/api/icon/getDynamicIcon` endpoint due to improper filtering of SVG elements with a namespace prefix (such as `<x:script>`). By using a namespaced script element, attackers can bypass the `SanitizeSVG` function and execute arbitrary JavaScript in the victim’s browser upon visiting a crafted link.\n",
                    "title": "nucleitemplates - https://github.com/projectdiscovery/nuclei-templates/raw/964619c228fe8bde06fbf794eb40cc1d89c97bae/http%2Fcves%2F2026%2FCVE-2026-34605.yaml"
                },
                {
                    "category": "other",
                    "text": "0.01068",
                    "title": "EPSS"
                },
                {
                    "category": "other",
                    "text": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
                    "title": "CVSSV4"
                },
                {
                    "category": "other",
                    "text": "8.6",
                    "title": "CVSSV4 base score"
                },
                {
                    "category": "other",
                    "text": "4.2",
                    "title": "NCSC Score"
                },
                {
                    "category": "other",
                    "text": "The value of the most recent EPSS score",
                    "title": "NCSC Score top increasing factors"
                },
                {
                    "category": "other",
                    "text": "There is exploit data available from source Nvd, Is related to an uncommon product vendor, Is related to (a version of) an uncommon product, The CVSS vector string contains A:N (Availability Impact: None)",
                    "title": "NCSC Score top decreasing factors"
                }
            ],
            "product_status": {
                "known_affected": [
                    "CSAFPID-5969659",
                    "CSAFPID-5970654",
                    "CSAFPID-5992478"
                ]
            },
            "references": [
                {
                    "category": "external",
                    "summary": "Source - nvd",
                    "url": "https://services.nvd.nist.gov/rest/json/cves/2.0?cveId=CVE-2026-34605"
                },
                {
                    "category": "external",
                    "summary": "Source - cveprojectv5",
                    "url": "https://raw.githubusercontent.com/CVEProject/cvelistV5/main/cves/2026/34xxx/CVE-2026-34605.json"
                },
                {
                    "category": "external",
                    "summary": "Source - github",
                    "url": "https://api.github.com/advisories/GHSA-73g7-86qr-jrg3"
                },
                {
                    "category": "external",
                    "summary": "Source - nucleitemplates",
                    "url": "https://github.com/projectdiscovery/nuclei-templates/raw/d4af2ef6978eeb1a1172e6a86a456fc949a16a4d/http%2Fcves%2F2026%2FCVE-2026-34605.yaml"
                },
                {
                    "category": "external",
                    "summary": "Source - nucleitemplates",
                    "url": "https://github.com/projectdiscovery/nuclei-templates/raw/964619c228fe8bde06fbf794eb40cc1d89c97bae/http%2Fcves%2F2026%2FCVE-2026-34605.yaml"
                },
                {
                    "category": "external",
                    "summary": "Source - first",
                    "url": "https://api.first.org/data/v1/epss?limit=10000&offset=0"
                },
                {
                    "category": "external",
                    "summary": "Reference - cveprojectv5; github; nvd",
                    "url": "https://github.com/siyuan-note/siyuan/issues/17246"
                },
                {
                    "category": "external",
                    "summary": "Reference - cveprojectv5; github; nvd",
                    "url": "https://github.com/siyuan-note/siyuan/releases/tag/v3.6.2"
                },
                {
                    "category": "external",
                    "summary": "Reference - cveprojectv5; github; nucleitemplates; nvd",
                    "url": "https://github.com/siyuan-note/siyuan/security/advisories/GHSA-73g7-86qr-jrg3"
                },
                {
                    "category": "external",
                    "summary": "Reference - github",
                    "url": "https://github.com/advisories/GHSA-73g7-86qr-jrg3"
                },
                {
                    "category": "external",
                    "summary": "Reference - nucleitemplates",
                    "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-34605"
                }
            ],
            "scores": [
                {
                    "cvss_v3": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N",
                        "baseScore": 6.1,
                        "baseSeverity": "MEDIUM"
                    },
                    "products": [
                        "CSAFPID-5969659",
                        "CSAFPID-5970654",
                        "CSAFPID-5992478"
                    ]
                }
            ],
            "title": "CVE-2026-34605"
        }
    ]
}