Skip to content
OpenAdvisories
Medium · 5.4 CVE-2026-102342 EUVD-2026-98766GHSA-m6mh-2hw2-555xRUSTSEC-2026-0213

ammonia allows stored XSS through unsanitized SVG animate and set attributes

Published Oct 13, 2026 · Updated Oct 13, 2026 · Assigned by GitHub_M

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.

Affected products

VendorProductAffectedFixed
rust-ammonia ammonia < 3.3.3, >= 4.0.0, < 4.0.3, >= 4.1.2, < 4.1.4 —

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.

ReleasePackageFixed inAdvisory
Debian 14 rust-ammonia 4.1.4-1 —
Debian 13 rust-ammonia No fix yet —
Debian 12 rust-ammonia No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 rust-ammonia No fix yet —
Ubuntu 26.04 LTS rust-ammonia No fix yet —
Ubuntu 24.04 LTS rust-ammonia No fix yet —
Ubuntu 22.04 LTS rust-ammonia No fix yet —

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 rust No fix yet —

Affected packages

EcosystemPackageAffectedFixedRecord
crates.io ammonia < 3.3.3 3.3.3 GHSA-m6mh-2hw2-555x
crates.io ammonia >= 4.0.0, < 4.0.3 4.0.3 GHSA-m6mh-2hw2-555x
crates.io ammonia >= 4.1.2, < 4.1.4 4.1.4 GHSA-m6mh-2hw2-555x
crates.io ammonia >= 0.0.0-0, < 3.3.3 · >= 4.0.0, < 4.0.3 · >= 4.1.0, < 4.1.4 3.3.3, 4.0.3, 4.1.4 RUSTSEC-2026-0213

References