Disclosure summary
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.
Source-reported weakness categories
CWE-79
Source-specific records & product guidance
Sources retain their own attribution and scoring. Follow the original record to confirm affected versions, fixed releases, and configuration conditions.
GitHub reviewed advisories · GHSA-9jh8-v38h-cvhr
Open original source · Updated Oct 22, 2026
ammonia: mXSS via MathML `annotation-xml` encoding strip
GitHub reviewed package advisory. Version ranges and patches are independently attributed; executable descriptions and source code locations are excluded.
Source severity: MEDIUM
| Vendor | Product / association | Version / bounds |
|---|---|---|
| rust | ammonia | < 3.3.2 |
| rust | ammonia | >= 4.0.0, < 4.0.2 |
| rust | ammonia | >= 4.1.0, < 4.1.3 |
NIST NVD · nvd:CVE-2026-63430
Open original source · Updated Oct 16, 2026
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.
Source severity: MEDIUM / 6.3
Indexed product associations
These cached associations support search and triage. Confirm applicability, platform conditions, and fixed versions in the original record.
| Vendor | Product | Version | Source / relationship |
|---|---|---|---|
| rust | ammonia | < 3.3.2 | GHSA-9jh8-v38h-cvhr / vendor-listed |
| rust | ammonia | >= 4.0.0, < 4.0.2 | GHSA-9jh8-v38h-cvhr / vendor-listed |
| rust | ammonia | >= 4.1.0, < 4.1.3 | GHSA-9jh8-v38h-cvhr / vendor-listed |
Original records & references
- NIST NVD record
- CVE Program record
- security-advisories@github.com
- security-advisories@github.com
- security-advisories@github.com
- security-advisories@github.com
- security-advisories@github.com
- security-advisories@github.com
- security-advisories@github.com
- security-advisories@github.com
- security-advisories@github.com
- security-advisories@github.com
- security-advisories@github.com
- security-advisories@github.com
Repositories cited by this CVE
The saved CVE record references these repositories. A citation can identify affected software, a fix, or related research; it does not verify exploit code. These citations are separate from automated search matches and local association reviews.
- rust-ammonia/ammonia CVE record citation
GitHub repository matches
Repository matches are links and GitHub-supplied metadata only. They are not verified working proof-of-concept code. Each supported query is bounded to ten pages and at most 1,000 indexed results. This is not a complete index of GitHub or public exploit research. Coverage can also be limited by provider availability, rate limits, rejected metadata, incomplete search results, manual review, and the recorded refresh time.
No stored repository matches
Repository discovery has not recorded an update for this CVE yet.
Discovery progress
0 of 3 discovery queries finished. GitHub returned 0 indexed results; 0 malformed or disallowed results were rejected.
No discovery update has been recorded for this CVE.
View all 0 stored repository matches
PUBLISHED 2026-10-15T19:17:42+00:00
MODIFIED 2026-10-16T16:00:33+00:00
INGESTED 2026-10-17T18:54:03+00:00