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

- Severity: Low (CVSS:4.0, scored by GitHub) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2026-03-18T20:17:12.000Z
- Modified: 2026-03-23T18:56:25.781Z
- Also known as: GO-2026-4765
- Weaknesses: CWE-79

## 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

```html
<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.

(As written by GitHub Advisory Database.)

## Affected

- github.com/k1LoW/mo (Go): before 0.18.5

## References

- <https://github.com/k1LoW/mo/security/advisories/GHSA-vccx-p757-pv6h> (advisory, web)
- <https://github.com/k1LoW/mo> (package)

## Sources

- GitHub Advisory Database: [GHSA-vccx-p757-pv6h](https://github.com/advisories/GHSA-vccx-p757-pv6h), CC-BY-4.0, modified 2026-03-23
- Go Vulnerability Database: [GO-2026-4765](https://pkg.go.dev/vuln/GO-2026-4765), CC-BY-4.0, modified 2026-03-23

---

Page: https://cve.day/GHSA-vccx-p757-pv6h · Whole record: https://cve.day/GHSA-vccx-p757-pv6h.json · Rebuilt by cve.day 2026-11-25T22:56:24.507Z
