low
mo has a XSS via inline SVG script tags in Markdown rendering
- Severity
- low CVSS:4.0 by GitHub
- Published
- Last changed
- Also known as
- GO-2026-4765
Description
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| github.com/k1LoW/mo (Go) | before 0.18.5 | GitHub Advisory Database, Go Vulnerability Database |
Classification
What each source says
GitHub Advisory Database
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.
Go Vulnerability Database
mo has a XSS via inline SVG script tags in Markdown rendering in github.com/k1LoW/mo
References
Sources
| Source | Record | Licence |
|---|---|---|
| GitHub Advisory Database | GHSA-vccx-p757-pv6h changed 2026-03-23 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2026-4765 changed 2026-03-23 | CC-BY-4.0 |