Skip to main content

CVE-2026-102342: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in rust-ammonia ammonia

0
Medium
VulnerabilityCVE-2026-102342cvecve-2026-102342cwe-79
Published: 10/13/2026 (10/13/2026, 14:28:50 UTC)
Source: CVE Database V5
Vendor/Project: rust-ammonia
Product: 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

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N

Affected software

rust-ammonia

ammonia

Affected versions
<3.3.3>=4.0.0 <4.0.3>=4.1.2 <4.1.4
crates.iomore threats →ai
github/rust-ammonia/ammonia
pkg:cargo/github/rust-ammonia/ammonia
Affected versions
<3.3.3>=4.0.0 <4.0.3>=4.1.2 <4.1.4

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 10/13/2026, 15:04:29 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses