{"items":[{"id":"NVI-00014027","kind":"vulnerability","title":"SiYuan: Stored and reflected XSS in SiYuan through an SVG sanitizer bypass","revision":1,"unknowns":["Customer inventory, deployment, reachability and exploitation have not been inspected."],"lifecycle":"active","identifiers":["GHSA-99rq-75j6-5j9f"],"plain_summary":"GitHub lists this reviewed advisory for github.com/siyuan-note/siyuan/kernel. Published version ranges and source prerequisites are shown below; this is not an inspection of a visitor’s application.","review_status":"source_listed","control_topics":[],"public_actions":[{"summary":"Identify the exact component and deployed version, examine the linked publisher’s conditions, and retain evidence of any mitigation.","source_ids":["sr-33df6701b83b3befc194dce48916e500"],"action_type":"investigate","limitations":"Confirm current vendor support, compatibility and deployment evidence. This report has not tested a fix in your system.","current_supported_target":null}],"schema_version":"1.1.0","source_metrics":[{"kind":"CVSS","as_of":"2026-09-03T14:53:18.000Z","value":"8.7 high","meaning":"GitHub source severity; exploitability and local consequence require separate evidence.","source_id":"sr-33df6701b83b3befc194dce48916e500"}],"why_it_matters":"Published affected context helps an owner decide what evidence to gather. This report has not examined your application.","related_sources":[{"id":"sr-33df6701b83b3befc194dce48916e500","url":"https://github.com/advisories/GHSA-99rq-75j6-5j9f","basis":"vendor_advisory","notes":"GitHub Advisory Database; CC-BY-4.0. Each advisory links its original attribution. Null normalizes fields.","title":"GHSA-99rq-75j6-5j9f","publisher":"GitHub Advisory Database","observed_at":"2026-11-02T02:21:29.477Z"}],"affected_context":[{"certainty":"source_listed","source_ids":["sr-33df6701b83b3befc194dce48916e500"],"technology":"github.com/siyuan-note/siyuan/kernel","known_exclusions":[],"conditions_summary":"### Summary\nSiYuan cleans user supplied SVG with `util.SanitizeSVG` before it serves the file inline as `image/svg+xml`. This cleaner is the guard behind the `Editor.AllowSVGScript` setting, which is off by default, so a `` inside an SVG is meant to be removed.\n\nThe cleaner reads the input as HTML, but the browser reads the served file as XML (SVG). Because the two parsers treat some tags differently, a `` can be hidden so the cleaner never removes it. The cleaned file still holds a working script. When a browser opens that file as an SVG document, the script runs in the app origin. There is no Content Security Policy in the product to stop it.\n\nThe same bug can be reached in two ways. Both share one root cause (the cleaner), so one fix in the cleaner closes both:\n\n* Reflected, through a single link: `GET /api/icon/getDynamicIcon`\n* Stored, through a planted `.svg` asset: `GET /assets/.svg`\n\nI confirmed this on a live SiYuan 3.7.2 kernel.\n\n## Root cause\n\n`util.SanitizeSVG` (`kernel/util/misc.go:319`) parses the string with an HTML parser, walks the element nodes to drop ``, ``, ``, event handler attributes and so on, then renders","public_affected_ranges":["< 0.0.0-20260714095344-f08dee71ba8e"]}],"null_published_at":"2026-11-02T10:00:37.198Z","source_updated_at":"2026-09-03T14:53:18.000Z","source_disclosed_at":"2026-09-03T14:53:17.000Z","is_synthetic_fixture":false,"null_last_reviewed_at":null,"public_change_summary":"First indexed by Null; source disclosure date is shown separately.","null_first_observed_at":"2026-11-02T02:21:29.477Z"}],"next_cursor":null,"snapshot_revision":"42594"}