Skip to main content

CVE-2026-102342 — Vulnerability in ammonia — CVE Details

MEDIUM

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

Published September 29, 2026Updated September 29, 2026Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (0.38%). Schedule for your next planned update.

Does your project use an affected ammonia version?

Paste your Cargo.lock to check it for CVE-2026-102342 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my Cargo.lock

Summary

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.

Advisory Timeline

  • First published September 29, 2026 (58 days ago).
  • Last revised September 29, 2026 — 0 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Cargo
Update ammonia to 4.0.3 or later
cargo update -p ammonia --precise 4.0.3
Cargo
Update ammonia to 4.1.4 or later
cargo update -p ammonia --precise 4.1.4
Cargo
Update ammonia to 3.3.3 or later
cargo update -p ammonia --precise 3.3.3

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (3)

Affects 1 ecosystem: crates.io (1).

PackageFixed In
ammonia crates.io · Affected: All versions4.0.3
ammonia crates.io · Affected: All versions4.1.4
ammonia crates.io · Affected: All versions3.3.3

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-79
    Cross-site Scripting (XSS)MITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 5.4 score means for each attack dimension.

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

Frequently Asked Questions

What is CVE-2026-102342?
Ammonia: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'). This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 5.4/10).
How do I check if my project is affected by CVE-2026-102342?
CVE-2026-102342 affects ammonia. It has a 0.4% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-102342 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
5.4

Exploitation requires specific conditions, or the impact is limited.

EPSS Score (30-day exploit probability)
0.38%
EPSS percentile: 23.6

This is a below-median EPSS score — only 23.6% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.

Also Known As

GHSA-m6mh-2hw2-555x
RUSTSEC-2026-0213

Related CVEs

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my Cargo.lock