# CVE-2026-63430: ammonia: mXSS in ammonia via MathML `annotation-xml` encoding strip

> Attackers can execute JavaScript via mutation XSS in ammonia when specific MathML tags are explicitly allowed, requiring an upgrade to secure applications.

- **Severity:** Medium 6.3 (`CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 15 Oct 2026
- **Updated:** 15 Oct 2026
- **Also known as:** DEBIAN-CVE-2026-63430, GHSA-9jh8-v38h-cvhr, RUSTSEC-2026-0193, UBUNTU-CVE-2026-63430

## What is CVE-2026-63430?

CVE-2026-63430 is a medium-severity cross-site scripting vulnerability in rust-ammonia ammonia, published on 15 Oct 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

ammonia is a Rust library for repairing and securing untrusted HTML. Prior to 3.3.2, 4.0.2, and 4.1.3, applications that explicitly allow the math tag, annotation-xml, and at least one raw-text HTML element while disallowing the encoding attribute can permit mutation cross-site scripting. ammonia does not correctly implement annotation-xml's encoding-dependent MathML integration-point behavior after attribute filtering removes encoding, so the sanitizer validates a descendant under one namespace interpretation while the browser reparses the output under another. An attacker can use that namespace transition and an allowed raw-text HTML element to execute JavaScript when a user renders the sanitized output. The required tags are not enabled by default, so applications that do not explicitly allow them are not affected. This issue is fixed in versions 3.3.2, 4.0.2, and 4.1.3.

Weakness: CWE-79 (Improper Neutralization of Input During Web Page Generation)

## Which versions are affected by CVE-2026-63430?

7 open source packages ship an affected version, including ammonia.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `ammonia` | crates.io | All versions | 3.3.2 |
| `ammonia` | crates.io | All versions | 3.3.2 |
| `ammonia` | crates.io | From 0.0.0-0 | 3.3.2, 4.0.2, 4.1.3 |
| `ammonia` | crates.io | From 4.0.0 | 4.0.2 |
| `ammonia` | crates.io | From 4.0.0 | 4.0.2 |
| `ammonia` | crates.io | From 4.1.0 | 4.1.3 |
| `ammonia` | crates.io | From 4.1.0 | 4.1.3 |

## How do I fix CVE-2026-63430?

Upgrade ammonia to a fixed version for your release line: 3.3.2, 4.0.2 or 4.1.3.

## Is CVE-2026-63430 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-63430 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-63430 and fix it if it is affected.

What it is: CVE-2026-63430 is a medium-severity cross-site scripting vulnerability in rust-ammonia ammonia, published on 15 Oct 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-63430 exists.

Affected packages and fixed versions:
- ammonia (crates.io): affected all versions; fixed in 3.3.2
- ammonia (crates.io): affected all versions; fixed in 3.3.2
- ammonia (crates.io): affected from 0.0.0-0; fixed in 3.3.2, 4.0.2, 4.1.3
- ammonia (crates.io): affected from 4.0.0; fixed in 4.0.2
- ammonia (crates.io): affected from 4.0.0; fixed in 4.0.2
- ammonia (crates.io): affected from 4.1.0; fixed in 4.1.3
- ammonia (crates.io): affected from 4.1.0; fixed in 4.1.3

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/CVE-2026-63430/ (Markdown: https://insights.sbomify.com/CVE-2026-63430/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-63430
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-63430
- OSV: https://osv.dev/vulnerability/CVE-2026-63430

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-63430/
Summaries are generated and may contain mistakes; the official description above is the record.
