GitHub Advisoryadvisory · Go

GHSA-vccx-p757-pv6h mo has a XSS via inline SVG script tags in Markdown rendering

LOW Published 2026-03-18 Modified 2026-03-18 Official page ↗
Ecosystem
Go
Packages
github.com/k1LoW/mo
Severity
Low
CVSS 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
Weaknesses
CWE-79
Reviewed
2026-03-18

Affected packages

• Go github.com/k1LoW/mo: < 0.18.5 → fixed in 0.18.5

Description

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 ```html alert(1) ``` 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 `` while preserving safe HTML.

Related

Weakness · CWE (1)

  • CWE-79 Improper Neutralization of Input During Web Page Generation weakness

References