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.
Published: 2026-10-13
Score: 5.4 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Stored Cross‑Site Scripting
Action: Patch immediately
AI Analysis

Impact

The vulnerability arises because the Ammonia library does not properly sanitise the SVG <animate> and <set> elements. When an SVG animation with an attributeName of 'href' contains a value that uses the 'javascript:' scheme, the sanitizer leaves the script‑bearing link intact. An attacker can inject such an SVG into untrusted HTML, have it stored in the application, and when a user later clicks on the link, the attacker’s JavaScript is executed in the context of the application’s origin. This constitutes a stored cross‑site scripting flaw, allowing an attacker to steal cookies, modify page content, or perform actions on behalf of users.

Affected Systems

Affected products are the Rust‑Ammonia sanitisation library under the vendor identifier rust‑ammonia:ammonia. Versions older than 3.3.3, 4.0.3, and 4.1.4 are vulnerable. Any application that allows users to upload or embed SVG content that includes <animate> or <set> elements, and then stores that content for later rendering, is at risk. The fix is released in the specified version lines and can be obtained from the official releases list.

Risk and Exploitability

The CVSS score of 5.4 indicates a medium impact, but the vulnerability can lead to full compromise of the application’s front‑end if an attacker successfully lures a user to click the malicious link. EPSS data is not provided, so the likelihood of exploitation cannot be quantified, and the vulnerability is not yet in the CISA KEV catalog. Attackers would need to supply crafted SVG content that is later rendered; having a stored payload means the compromise can spread to any user who views the data. Because the flaw is triggered by user interaction (clicking the link), the risk is tied to user behavior, but the potential damage remains substantial.

Generated by OpenCVE AI on October 13, 2026 at 17:07 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the official patch in versions 3.3.3, 4.0.3, or 4.1.4, which mitigates the stored XSS flaw identified as CWE‑79.
  • Disable or filter SVG <animate> and <set> elements before sanitization, addressing the XSS weakness (CWE‑79).
  • Implement application‑level validation to reject or sanitize any SVG elements using the href attribute with a 'javascript:' scheme, thereby preventing the XSS vulnerability (CWE‑79).

Generated by OpenCVE AI on October 13, 2026 at 17:07 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-m6mh-2hw2-555x Ammonia: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
History

Thu, 22 Oct 2026 09:30:00 +0000

Type Values Removed Values Added
First Time appeared Rust-ammonia
Rust-ammonia ammonia
Vendors & Products Rust-ammonia
Rust-ammonia ammonia

Wed, 14 Oct 2026 00:30:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

threat_severity

Moderate


Tue, 13 Oct 2026 22:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Tue, 13 Oct 2026 15:00:00 +0000

Type Values Removed Values Added
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.
Title ammonia allows stored XSS through unsanitized SVG animate and set attributes
Weaknesses CWE-79
References
Metrics cvssV3_1

{'score': 5.4, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N'}


Subscriptions

Rust-ammonia Ammonia
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-10-13T20:23:10.660Z

Reserved: 2026-09-28T22:38:42.254Z

Link: CVE-2026-102342

cve-icon Vulnrichment

Updated: 2026-10-13T20:13:17.247Z

cve-icon NVD

Status : Deferred

Published: 2026-10-13T15:17:30.177

Modified: 2026-10-16T20:04:29.760

Link: CVE-2026-102342

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-10-13T14:28:50Z

Links: CVE-2026-102342 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-10-22T09:08:40Z

Weaknesses
  • CWE-79

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