CVE-2026-102342 ammonia allows stored XSS through unsanitized SVG animate and set attributes
Attackers can inject malicious scripts via unsanitized SVG attributes, leading to stored XSS in applications using the ammonia library.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2026-102342?
CVE-2026-102342 is a medium-severity cross-site scripting vulnerability in rust-ammonia ammonia, published on 13 Oct 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Official description
ammonia is a Rust library for repairing and securing untrusted HTML. Prior to 3.3.3, 4.0.3, and 4.1.4, applications that allow the SVG animate or set elements can retain an animation whose attributeName targets href and whose value uses the javascript scheme. The sanitized SVG can therefore create a script-bearing link, and a user who clicks the link can execute attacker-controlled script in the application's origin, enabling stored cross-site scripting. This issue is fixed in versions 3.3.3, 4.0.3, and 4.1.4.
Weakness: CWE-79
Which versions are affected by CVE-2026-102342?
7 open source packages ship an affected version, including ammonia.
| Package | Affected | Fixed in |
|---|---|---|
ammonia crates.io | All versions | 3.3.3 |
ammonia crates.io | All versions | 3.3.3 |
ammonia crates.io | From 0.0.0-0 | 3.3.3, 4.0.3, 4.1.4 |
ammonia crates.io | From 4.0.0 | 4.0.3 |
ammonia crates.io | From 4.0.0 | 4.0.3 |
ammonia crates.io | From 4.1.2 | 4.1.4 |
1 more packages
ammonia crates.io | From 4.1.2 | 4.1.4 |
How do I fix CVE-2026-102342?
Upgrade ammonia to a fixed version for your release line: 3.3.3, 4.0.3 or 4.1.4.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2026-102342 being exploited?
There is no known exploitation of CVE-2026-102342 in the wild and no public exploit code.
Sources
Also known as AZL-108048, AZL-108051, DEBIAN-CVE-2026-102342, GHSA-m6mh-2hw2-555x, RUSTSEC-2026-0213, UBUNTU-CVE-2026-102342.