Advisory

GHSA-vccx-p757-pv6h

Also known as: GO-2026-4765

Summary

mo has a XSS via inline SVG script tags in Markdown rendering

Details

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.

Severity

Low Basis: The source's own band: LOW

Dates

Published
2026-03-18 20:17 UTC
Modified
2026-03-23 18:56 UTC

Affected packages and fixes

github.com/k1LoW/mo

Go · All systems

Affected

  • introduced 0, fixed 0.18.5 (semver)

Fixed versions

0.18.5

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences