Advisory

GHSA-m6mh-2hw2-555x

Also known as: CVE-2026-102342, RUSTSEC-2026-0213

Summary

Ammonia: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Details

The following SVG will produce a link with a javascript scheme. If the user clicks this link, they will run it.

<svg xmlns="http://www.w3.org/2000/svg">
  <a>
    <set attributeName="href" to="javascript:alert('SET_XSS')"></set>
    <text y="30">Click set</text>
  </a>
</svg>

Impact

Allows stored XSS in applications that allow the animate and set tags.

Patches

Fixed in 3.3.3, 4.0.3, and 4.1.4

Workarounds

Do not enable the animate or set tags.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2026-09-29 23:09 UTC
Modified
2026-09-29 23:25 UTC

Affected packages and fixes

ammonia

crates.io · All systems

Affected

  • introduced 0, fixed 3.3.3 (semver)

Fixed versions

3.3.3

Fix

  • Fixed version 3.3.3
    cargo update -p ammonia --precise 3.3.3

ammonia

crates.io · All systems

Affected

  • introduced 4.0.0, fixed 4.0.3 (semver)

Fixed versions

4.0.3

Fix

  • Fixed version 4.0.3
    cargo update -p ammonia --precise 4.0.3

ammonia

crates.io · All systems

Affected

  • introduced 4.1.2, fixed 4.1.4 (semver)

Fixed versions

4.1.4

Fix

  • Fixed version 4.1.4
    cargo update -p ammonia --precise 4.1.4

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences