RUSTSEC-2025-0071
LOWAmmonia incorrectly handles embedded SVG and MathML leading to mutation XSS after removal
Affected versions of this crate did not correctly strip namespace-incompatible tags
in certain situations, causing it to incorrectly account for differences between HTML,
SVG, and MathML.
This vulnerability only has an effect when the svg or math tag is allowed,
because it relies on a tag being parsed as html during the cleaning process, but
serialized in a way that causes in to be parsed as xml by the browser.
Additionally, the application using this library must allow a tag that is parsed as raw text in HTML.
These elements are:
- title
- textarea
- xmp
- iframe
- noembed
- noframes
- plaintext
- noscript
- style
- script
Applications that do not explicitly allow any of these tags should not be affected, since none are allowed by default.
- Published
- 21 Sep 2025
- Last modified
- 10 Sep 2026
- Weakness
- CWE-79
- Also known as
- GHSA-mm7x-qfjj-5g2c
- Sources
- OSV GHSA-mm7x-qfjj-5g2cJSONOSVJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| OSV | GitHub | CVSS 4.0 | 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:U |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | crates.io | ammonia | >= 4.1.0, < 4.1.2 | 4.1.2 |
| OSV | crates.io | ammonia | >= 4.0.0, < 4.0.1 | 4.0.1 |
| OSV | crates.io | ammonia | < 3.3.1 | 3.3.1 |
| OSV | crates.io | ammonia | >= 0.0.0-0, < 3.3.1; >= 4.0.0, < 4.0.1; >= 4.1.0, < 4.1.2 | 3.3.1, 4.0.1, 4.1.2 |
References
- https://github.com/rust-ammonia/ammonia/commit/de0297111a3a1273275b670960bcd47a0481718e · WEB
- https://github.com/rust-ammonia/ammonia · PACKAGE
- https://rustsec.org/advisories/RUSTSEC-2025-0071.html · WEB, ADVISORY
- https://crates.io/crates/ammonia · PACKAGE
History
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 21 Sep 2025)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 22 Sep 2025)