ammonia: mXSS in ammonia via MathML `annotation-xml` encoding strip
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 3.3.2, 4.0.2, 4.1.3
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
- Exploitation: poc
- Automatable: yes
- Technical impact: partial
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.
Timeline
- CVE published
- CISA SSVC assessment
Exploitation: poc · Automatable: yes · Technical impact: partial
- Record last updated
Affected versions
- rust-ammonia ammonia
fixed in 3.3.2; From 4.0.0 · fixed in 4.0.2; From 4.1.0 · fixed in 4.1.3
- ammoniacrates.io
fixed in 3.3.2
- ammoniacrates.io
From 4.0.0 · fixed in 4.0.2
- ammoniacrates.io
From 4.1.0 · fixed in 4.1.3
- ammoniacrates.io
From 0.0.0-0 · fixed in 3.3.2; From 4.0.0 · fixed in 4.0.2; From 4.1.0 · fixed in 4.1.3