CVE-2026-102342
Received Received - Intake

Stored XSS in Ammonia HTML Sanitizer

Vulnerability report for CVE-2026-102342, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-10-13

Last updated on: 2026-10-13

Assigner: GitHub, Inc.

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 Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-10-13
Last Modified
2026-10-13
Generated
2026-10-13
AI Q&A
2026-10-13
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 3 associated CPEs
Vendor Product Version / Range
rust-ammonia ammonia < 3.3.3
rust-ammonia ammonia >= 4.0.0, < 4.0.3
rust-ammonia ammonia >= 4.1.2, < 4.1.4

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-79 The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability affects the ammonia Rust library, which is used to sanitize and secure untrusted HTML. Versions prior to 3.3.3, 4.0.3, and 4.1.4 allow SVG elements with animation or set elements targeting href attributes using javascript: scheme. This can create a script-bearing link that executes attacker-controlled script when clicked, leading to stored cross-site scripting (XSS).

Detection Guidance

Check the version of ammonia in your project dependencies. If using Cargo, run cargo tree -p ammonia to verify if the version is below 3.3.3, 4.0.3, or 4.1.4. Inspect SVG inputs for animate or set elements targeting href with javascript: values.

Impact Analysis

If you use an affected version of ammonia in your application, attackers could inject malicious scripts via SVG animations. When users interact with these sanitized but malicious SVGs, the scripts execute in your application's context, potentially stealing user data, session tokens, or performing unauthorized actions on behalf of users.

Compliance Impact

This vulnerability could lead to unauthorized data access or modification, violating GDPR's integrity and confidentiality principles or HIPAA's safeguards for protected health information. Organizations may face compliance violations, fines, or reputational damage if exploited.

Mitigation Strategies

Upgrade ammonia to version 3.3.3, 4.0.3, or 4.1.4 or later. Review and sanitize SVG inputs to remove or neutralize animate or set elements with javascript: in href attributes. Apply input validation and output encoding in your application.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-102342. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart