Skip to main content
← All vulnerabilities
CVE-2026-102342RUSTSEC-2026-0213GHSA-M6MH-2HW2-555X

ammonia allows stored XSS through unsanitized SVG animate and set attributes

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 3.3.3, 4.0.3, 4.1.4
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: none
  • Automatable: no
  • Technical impact: partial

Summary

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: none · Automatable: no · Technical impact: partial

  3. Record last updated

Affected versions

  • rust-ammonia ammonia

    fixed in 3.3.3; From 4.0.0 · fixed in 4.0.3; From 4.1.2 · fixed in 4.1.4

  • ammoniacrates.io

    fixed in 3.3.3

  • ammoniacrates.io

    From 4.0.0 · fixed in 4.0.3

  • ammoniacrates.io

    From 4.1.2 · fixed in 4.1.4

  • ammoniacrates.io

    From 0.0.0-0 · fixed in 3.3.3; From 4.0.0 · fixed in 4.0.3; From 4.1.0 · fixed in 4.1.4

References 10

GitHub · rust-ammonia/ammonia