ammonia
Affected
- introduced
0, fixed3.3.3(semver)
Fixed versions
3.3.3
Fix
- Fixed version
3.3.3cargo update -p ammonia --precise 3.3.3
Advisory
Also known as: CVE-2026-102342, RUSTSEC-2026-0213
Ammonia: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
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.
Medium Basis: The source's own band: MODERATE
0, fixed 3.3.3 (semver)3.3.3
3.3.3cargo update -p ammonia --precise 3.3.34.0.0, fixed 4.0.3 (semver)4.0.3
4.0.3cargo update -p ammonia --precise 4.0.34.1.2, fixed 4.1.4 (semver)4.1.4
4.1.4cargo update -p ammonia --precise 4.1.4Fix 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
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0