{"id":"GHSA-vccx-p757-pv6h","aliases":["GHSA-vccx-p757-pv6h","GO-2026-4765"],"related":[],"kind":"vulnerability","state":"published","title":"mo has a XSS via inline SVG script tags in Markdown rendering","summary":"### Summary\n\nWhen rendering Markdown files containing inline SVG elements with `<script>` 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<svg><script>alert(1)</script></svg>\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 `<script>` while preserving safe HTML.","summaryFormat":"markdown","summarySource":"ghsa","descriptions":[{"lang":"en","text":"### Summary\n\nWhen rendering Markdown files containing inline SVG elements with `<script>` 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<svg><script>alert(1)</script></svg>\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 `<script>` while preserving safe HTML.","format":"markdown","source":"ghsa"},{"lang":"en","text":"mo has a XSS via inline SVG script tags in Markdown rendering in github.com/k1LoW/mo","format":"markdown","source":"go"}],"published":"2026-03-18T20:17:12.000Z","modified":"2026-03-23T18:56:25.781Z","severity":{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"LOW"},"severities":[{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"LOW"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.18.5"}],"ecosystem":"Go","package":"github.com/k1LoW/mo","purl":"pkg:golang/github.com/k1LoW/mo","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.18.5"}],"ecosystem":"Go","package":"github.com/k1LoW/mo","purl":"pkg:golang/github.com/k1LoW/mo","source":"go"}],"references":[{"url":"https://github.com/k1LoW/mo/security/advisories/GHSA-vccx-p757-pv6h","tags":["advisory","web"],"sources":["ghsa","go"]},{"url":"https://github.com/k1LoW/mo","tags":["package"],"sources":["ghsa"]}],"credits":[],"sources":[{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-vccx-p757-pv6h","url":"https://github.com/advisories/GHSA-vccx-p757-pv6h","licence":"CC-BY-4.0","modified":"2026-03-23T18:56:25.781Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-4765","url":"https://pkg.go.dev/vuln/GO-2026-4765","licence":"CC-BY-4.0","modified":"2026-03-23T18:45:18.870Z"}],"updatedAt":"2026-11-25T22:56:24.507Z"}