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

> Attackers can execute arbitrary JavaScript and exfiltrate data by tricking users into opening malicious Markdown files with inline SVG scripts.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 18 Mar 2026
- **Also known as:** GO-2026-4765

## What is GHSA-vccx-p757-pv6h?

GHSA-vccx-p757-pv6h is a cross-site scripting vulnerability in github.com/k1LoW/mo, published on 18 Mar 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

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

## Which versions are affected by GHSA-vccx-p757-pv6h?

3 open source packages ship an affected version, including github.com/k1LoW/mo.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/k1LoW/mo` | Go | All versions | 0.18.5 |
| `github.com/k1LoW/mo` | Go | All versions | 0.18.5 |
| `github.com/k1LoW/mo` | Go | All versions | 0.18.5 |

## How do I fix GHSA-vccx-p757-pv6h?

Upgrade github.com/k1LoW/mo to 0.18.5 or later.

## Is GHSA-vccx-p757-pv6h being exploited?

There is no known exploitation of GHSA-vccx-p757-pv6h in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-vccx-p757-pv6h and fix it if it is affected.

What it is: GHSA-vccx-p757-pv6h is a cross-site scripting vulnerability in github.com/k1LoW/mo, published on 18 Mar 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of GHSA-vccx-p757-pv6h in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/k1LoW/mo (Go): affected all versions; fixed in 0.18.5
- github.com/k1LoW/mo (Go): affected all versions; fixed in 0.18.5
- github.com/k1LoW/mo (Go): affected all versions; fixed in 0.18.5

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-vccx-p757-pv6h/ (Markdown: https://insights.sbomify.com/GHSA-vccx-p757-pv6h/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-vccx-p757-pv6h

---
From sbomify Insights: https://insights.sbomify.com/GHSA-vccx-p757-pv6h/
Summaries are generated and may contain mistakes; the official description above is the record.
