CVE-2026-102342: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in rust-ammonia ammonia
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.
CVSS v3.1
Score 5.4medium
Affected software
rust-ammonia
ammonia
pkg:cargo/github/rust-ammonia/ammoniaRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The ammonia Rust library versions before 3.3.3, between 4.0.0 and before 4.0.3, and between 4.1.2 and before 4.1.4 contain a stored cross-site scripting vulnerability. This occurs because sanitized SVG elements (animate or set) can retain an animation whose attributeName targets href with a javascript scheme value. This allows an attacker to embed a script-bearing link in sanitized HTML, which executes attacker-controlled JavaScript in the application's origin when a user clicks the link. The vulnerability is identified as CWE-79 (Improper Neutralization of Input During Web Page Generation).
Potential Impact
An attacker can craft SVG content that, after sanitization by vulnerable ammonia versions, contains a link that executes arbitrary JavaScript in the context of the vulnerable application when clicked by a user. This enables stored cross-site scripting attacks, potentially leading to information disclosure or session hijacking within the application's origin. The CVSS 3.1 base score is 5.4 (medium severity), reflecting network attack vector, low attack complexity, required privileges, user interaction, and partial confidentiality and integrity impact without availability impact.
Mitigation Recommendations
Upgrade ammonia to version 3.3.3, 4.0.3, or 4.1.4 or later, where this vulnerability is fixed. No other mitigation is indicated or required as the fix is available in these versions.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-09-28T22:38:42.254Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 6ace44e52cdf04f656782269
Added to database: 10/13/2026, 14:49:09 UTC
Last enriched: 10/13/2026, 15:04:29 UTC
Last updated: 10/13/2026, 21:05:52 UTC
Views: 8
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.