GHSA-vccx-p757-pv6h: mo has a XSS via inline SVG script tags in Markdown rendering
Summary When rendering Markdown files containing inline SVG elements with 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. PoC Embedding the above in a Markdown file opened with mo causes the script to execute.
Published Mar 18, 2026
Affected packages
github.com/k1LoW/mo
- Ecosystem
- Go
- Affected
- <= 0.18.4
- Fixed in
- 0.18.5
- Check
go list -m github.com/k1LoW/mo
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Summary
When 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.
PoC
<svg><script>alert(1)</script></svg>Embedding the above in a Markdown file opened with mo causes the script to execute.
Impact
Arbitrary 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.
Remediation
Fixed by adding rehype-sanitize to the Markdown rendering pipeline, which strips dangerous elements such as <script> while preserving safe HTML.
Credited to yagihash.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
