Live threats

All CVEs / rust-ammonia

CVE-2026-63430rust-ammonia ammonia

Medium 6.3 No auth needed

Priority
53
CVSS 4.0
6.3
EPSS
—
Auth required
No
Published
Oct 15, 2026
Updated
Oct 16, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-79
SSVC (CISA)
Exploitation: proof of concept · Automatable: yes · Technical impact: partial
Vector
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

What happens

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for ammonia.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
crates.io ammonia < 3.3.2 3.3.2 cargo update -p ammonia --precise 3.3.2
crates.io ammonia ≥ 4.0.0 < 4.0.2 4.0.2 cargo update -p ammonia --precise 4.0.2
crates.io ammonia ≥ 4.1.0 < 4.1.3 4.1.3 cargo update -p ammonia --precise 4.1.3
crates.io ammonia ≥ 0.0.0-0 < 3.3.2 3.3.2 cargo update -p ammonia --precise 3.3.2
crates.io ammonia ≥ 4.0.0 < 4.0.2 4.0.2 cargo update -p ammonia --precise 4.0.2
crates.io ammonia ≥ 4.1.0 < 4.1.3 4.1.3 cargo update -p ammonia --precise 4.1.3

Per OSV / GitHub Advisories (GHSA-9jh8-v38h-cvhr, RUSTSEC-2026-0193). Check the version in your lockfile before upgrading.

Affected products

As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.

Official advisories

Vendor, CERT and distribution advisories that name this CVE. Original titles.

Official sources

References

Links published by the sources. Open them with care.