Description
An issue was discovered in the ammonia crate before 3.1.0 for Rust. XSS can occur because the parsing differences for HTML, SVG, and MathML are mishandled, a similar issue to CVE-2020-26870.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | rust-ammonia | 3.1.2-1 | — |
| Debian 13 | rust-ammonia | 3.1.2-1 | — |
| Debian 12 | rust-ammonia | 3.1.2-1 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | rust-ammonia | No fix yet | — |
| Ubuntu 26.04 LTS | rust-ammonia | No fix yet | — |
| Ubuntu 25.10 | rust-ammonia | No fix yet | — |
| Ubuntu 24.04 LTS | rust-ammonia | No fix yet | — |
| Ubuntu 22.04 LTS | rust-ammonia | No fix yet | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| crates.io | ammonia | >= 3.0.0, < 3.1.0 | 3.1.0 | GHSA-5325-xw5m-phm3 |
| crates.io | ammonia | < 2.1.3 | 2.1.3 | GHSA-5325-xw5m-phm3 |
| crates.io | ammonia | >= 0.0.0-0, < 2.1.3 · >= 3.0.0, < 3.1.0 | 2.1.3, 3.1.0 | RUSTSEC-2021-0074 |