CVE-2026-102342: Ammonia cross-site scripting in SVG animate and set tags

CVE-2026-102342 · Severity: medium · CVSS 5.4 · Published 2026-10-13

Ammonia is a Rust library that sanitizes HTML to prevent attacks. It fails to properly neutralize SVG animate and set tags, allowing attackers to inject JavaScript code that runs when a user clicks a crafted link. Applications using Ammonia to clean user-supplied HTML are vulnerable to stored cross-site scripting attacks that can steal session tokens, redirect users, or perform actions on their behalf.

Technologies: ammonia (crates.io). Vendors: crates.io.

Quick answers

Is CVE-2026-102342 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-102342 being exploited in the wild.
How severe is CVE-2026-102342?
Medium severity, with a CVSS score of 5.4, published 13 October 2026.
Which products and versions are affected?
Ammonia Project Ammonia < 3.3.2, >= 4.0.0 and <= 4.0.2, >= 4.1.2 and <= 4.1.3; ammonia (crates.io) SEMVER:introduced=0,fixed=3.3.3.
Is there a fix for CVE-2026-102342?
Yes. ammonia (crates.io): upgrade to 3.3.3 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-102342 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-102342?
Check whether you run Ammonia Project Ammonia or ammonia (crates.io) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • ammonia (crates.io): upgrade to 3.3.3 or later
    cargo update -p ammonia

Technical details

Ammonia fails to strip or neutralize the SVG animate and set elements when they manipulate link href attributes to javascript: schemes. An unauthenticated network attacker with low privileges can store malicious SVG markup; when a user clicks the resulting link, the JavaScript executes in their browser context. Patches exist in versions 3.3.3, 4.0.3, and 4.1.4.

Affected products

  • Ammonia Project Ammonia < 3.3.2, >= 4.0.0 and <= 4.0.2, >= 4.1.2 and <= 4.1.3

Identifiers

  • CVE-2026-102342
  • GHSA-m6mh-2hw2-555x

Timeline

  • 2026-09-29: disclosed

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.