{"id":"GHSA-vccx-p757-pv6h","summary":"mo has a XSS via inline SVG script tags in Markdown rendering","details":"### Summary\n\nWhen rendering Markdown files containing inline SVG elements with `\u003cscript\u003e` tags, the embedded JavaScript is executed in the browser. This is due to `rehype-raw` passing raw HTML (including SVG) through to the DOM without sanitization.\n\n### PoC\n\n```html\n\u003csvg\u003e\u003cscript\u003ealert(1)\u003c/script\u003e\u003c/svg\u003e\n```\n\nEmbedding the above in a Markdown file opened with mo causes the script to execute.\n\n### Impact\n\nArbitrary JavaScript execution in the context of the mo application when a user opens a malicious Markdown file. This could lead to data exfiltration of other opened Markdown file contents.\n\n### Remediation\n\nFixed by adding `rehype-sanitize` to the Markdown rendering pipeline, which strips dangerous elements such as `\u003cscript\u003e` while preserving safe HTML.","aliases":["GO-2026-4765"],"modified":"2026-03-23T18:56:25.781957Z","published":"2026-03-18T20:17:12Z","database_specific":{"severity":"LOW","github_reviewed":true,"github_reviewed_at":"2026-03-18T20:17:12Z","nvd_published_at":null,"cwe_ids":["CWE-79"]},"references":[{"type":"WEB","url":"https://github.com/k1LoW/mo/security/advisories/GHSA-vccx-p757-pv6h"},{"type":"PACKAGE","url":"https://github.com/k1LoW/mo"}],"affected":[{"package":{"name":"github.com/k1LoW/mo","ecosystem":"Go","purl":"pkg:golang/github.com/k1LoW/mo"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.18.5"}]}],"database_specific":{"last_known_affected_version_range":"\u003c= 0.18.4","source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/03/GHSA-vccx-p757-pv6h/GHSA-vccx-p757-pv6h.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:P/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N"}]}