CVE-2026-63430: Rust Ammonia XSS via MathML annotation-xml encoding strip

CVE-2026-63430 · Severity: medium · CVSS 4 · Published 2026-10-22

Ammonia is a Rust library that sanitizes HTML to prevent malicious code injection. When MathML support and certain HTML tags are enabled together, an attacker can craft a malicious HTML snippet that bypasses the sanitizer's defenses, allowing arbitrary JavaScript execution in a user's browser. This requires non-default configuration of the sanitizer.

Technologies: ammonia (crates.io). Vendors: crates.io.

Quick answers

Is CVE-2026-63430 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-63430 being exploited in the wild.
How severe is CVE-2026-63430?
Medium severity, with a CVSS score of 4, published 22 October 2026.
Which products and versions are affected?
ammonia (crates.io) < 3.3.2, SEMVER:introduced=0,fixed=3.3.2, SEMVER:introduced=0.0.0-0,fixed=3.3.2,introduced=4.0.0,fixed=4.0.2,introduced=4.1.0,fixed=4.1.3; Rust-Ammonia Ammonia before 3.3.2, 4.0.2, 4.1.3.
Is there a fix for CVE-2026-63430?
Yes. ammonia (crates.io): upgrade to 3.3.2, 4.1.3 or later. Until then: Call builder.add_clean_content_tags("annotation-xml") to remove the annotation-xml element and all of its children, preventing the XSS gadget from being parsed. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-63430 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-63430?
Check whether you run ammonia (crates.io) or Rust-Ammonia Ammonia at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • ammonia (crates.io): upgrade to 3.3.2, 4.1.3 or later
    cargo update -p ammonia

Call builder.add_clean_content_tags("annotation-xml") to remove the annotation-xml element and all of its children, preventing the XSS gadget from being parsed.

Technical details

The vulnerability is a mutated XSS (mXSS) that exploits differences in how HTML and MathML parsers handle the `annotation-xml` tag. When the `encoding` attribute is stripped by the attribute filter but the tag remains, child elements previously parsed as HTML become reinterpreted as MathML, enabling exploitation via raw-text elements (script, style, textarea, etc.). The attack vector requires an attacker to control HTML input and the application to enable both MathML and at least one raw-text tag in the sanitizer configuration.

Affected products

  • Rust Ammonia Ammonia before 3.3.2, 4.0.2, 4.1.3

Identifiers

  • CVE-2026-63430
  • GHSA-9jh8-v38h-cvhr
  • RUSTSEC-2026-0193

Timeline

  • 2026-10-22: disclosed
  • 2026-10-22: patched: patches released in versions 3.3.2, 4.0.2, 4.1.3

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.