Mutation cross-site scripting in ammonia via MathML annotation-xml
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- Present
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- None · None · None
- Fix status
- Partial Red Hat: 6 without a fix
Attack profile from CVSS 4.0 · CNA. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-79.
Summary
ammonia, a Rust library for repairing and securing untrusted HTML, is affected before 3.3.2, from 4.0.0 before 4.0.2, and from 4.1.0 before 4.1.3. After attribute filtering removes encoding from annotation-xml, the sanitizer and the browser interpret MathML integration points differently, which enables cross-site scripting (CWE-79). An attacker can execute JavaScript when a user renders the output, but only if the application explicitly allows the math and annotation-xml tags and at least one raw-text HTML element while disallowing the encoding attribute.
Written with Claude Haiku 5.5 from the sources below · 2026-10-28
Description from the CNA
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| rust-ammonia | ammonia | before 3.3.2; 4.0.0 to before 4.0.2; 4.1.0 to before 4.1.3 | 3.3.2, 4.0.2, 4.1.3 | Patch available | CNA |
| — | ammonia (crates.io) | before 3.3.2 | 3.3.2 | Patch available | GHSA-9jh8-v38h-cvhr |
| — | ammonia (crates.io) | 4.0.0 to before 4.0.2 | 4.0.2 | Patch available | GHSA-9jh8-v38h-cvhr |
| — | ammonia (crates.io) | 4.1.0 to before 4.1.3 | 4.1.3 | Patch available | GHSA-9jh8-v38h-cvhr |
- ammonia Vendorrust-ammonia Affected before 3.3.2; 4.0.0 to before 4.0.2; 4.1.0 to before 4.1.3 Fixed in 3.3.2, 4.0.2, 4.1.3 Patch available CNA
- ammonia (crates.io) Vendor— Affected before 3.3.2 Fixed in 3.3.2 Patch available GHSA-9jh8-v38h-cvhr
- ammonia (crates.io) Vendor— Affected 4.0.0 to before 4.0.2 Fixed in 4.0.2 Patch available GHSA-9jh8-v38h-cvhr
- ammonia (crates.io) Vendor— Affected 4.1.0 to before 4.1.3 Fixed in 4.1.3 Patch available GHSA-9jh8-v38h-cvhr
Remediation
Upgrade ammonia to 3.3.2, 4.0.2 or 4.1.3 on crates.io. Red Hat lists Ansible Automation Orchestrator 2026, Red Hat Ansible Automation Platform 2, Red Hat Enterprise Linux 8, 9 and 10, and Red Hat Satellite 6 as affected without a fix, with no plan available.
Written with Claude Haiku 5.5 from the sources below · 2026-10-28
- Fix · CNA ammonia (rust-ammonia) Fixed in 3.3.2, 4.0.2, 4.1.3
- Fix · GHSA-9jh8-v38h-cvhr ammonia (crates.io) Fixed in 3.3.2 Advisory →
- Fix · GHSA-9jh8-v38h-cvhr ammonia (crates.io) Fixed in 4.0.2 Advisory →
- Fix · GHSA-9jh8-v38h-cvhr ammonia (crates.io) Fixed in 4.1.3 Advisory →
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Ansible Automation Orchestrator 2026 | Affected | No fix yet: Fix deferred |
| Red Hat Ansible Automation Platform 2 | Affected | No fix yet: Fix deferred |
| Red Hat Enterprise Linux 10 | Affected | No fix yet: Fix deferred |
| Red Hat Enterprise Linux 8 | Affected | No fix yet: Fix deferred |
| Red Hat Enterprise Linux 9 | Affected | No fix yet: Fix deferred |
| Red Hat Satellite 6 | Affected | No fix yet: Fix deferred |
Timeline
- 2026-10-16 Threatist record created from CVE-2026-63430
- 2026-10-16 Affected versions changed · Red Hat
- 2026-10-16 CVSS score added · Red Hat
- 2026-10-22 Alias added: GHSA-9jh8-v38h-cvhr
- 2026-10-22 Fix available: crates.io/[email protected], crates.io/[email protected], crates.io/[email protected] · GHSA-9jh8-v38h-cvhr
- 2026-10-22 CVSS score added · GHSA-9jh8-v38h-cvhr
- 2026-10-22 Weakness changed · GHSA-9jh8-v38h-cvhr
- 2026-10-22 14 new references · GHSA-9jh8-v38h-cvhr
References
Other 13
- https://github.com/rust-ammonia/ammonia/security/advisories/GHSA-9jh8-v38h-cvhr
- https://github.com/rust-ammonia/ammonia/pull/243
- https://github.com/rust-ammonia/ammonia/pull/244
- https://github.com/rust-ammonia/ammonia/pull/245
- https://github.com/rust-ammonia/ammonia/commit/004bf2cee4288f74a6ee619d589e3e90c24c09ca
- https://github.com/rust-ammonia/ammonia/commit/7ac3fd3145236f28857eeecbadb544c8659cba31
- https://github.com/rust-ammonia/ammonia/commit/b51bf4f9749ed3cd518330105f20a2c39c9ee274
- https://github.com/rust-ammonia/ammonia/releases/tag/v3.3.2
- https://github.com/rust-ammonia/ammonia/releases/tag/v4.0.2
- https://github.com/rust-ammonia/ammonia/releases/tag/v4.1.3
- https://ivan09999.github.io/ammonia-mxss
- https://rustsec.org/advisories/RUSTSEC-2026-0193.html
- https://github.com/rust-ammonia/ammonia
More rust-ammonia vulnerabilities
- TI-2026-71821 Stored cross-site scripting in ammonia via SVG animate and set CVSS 3.1MEDIUM 5.4
Sources
- CVE-2026-63430 · CVE Program
- CVE-2026-63430 · NVD
- FIRST EPSS
- GHSA-9jh8-v38h-cvhr · GitHub Advisory Database · CC BY 4.0
- CVE-2026-63430 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences