CVE-2026-102342 — Vulnerability in ammonia — CVE Details
Ammonia: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
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.
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 -p ammonia --precise 4.0.3
cargo update -p ammonia --precise 4.1.4
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).
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-79Cross-site Scripting (XSS)MITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 5.4 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
References
- https://github.com/rust-ammonia/ammonia/security/advisories/GHSA-m6mh-2hw2-555xWEB
- https://github.com/rust-ammonia/ammonia/pull/250WEB
- https://github.com/rust-ammonia/ammonia/pull/251WEB
- https://github.com/rust-ammonia/ammonia/pull/252WEB
- https://github.com/rust-ammonia/ammonia/commit/9394bd81179e756cb911314deabd943f1a9c8989WEB
- https://github.com/rust-ammonia/ammonia/commit/9e3335e2dd8ab07346ff7997f20662a3da4023f6WEB
- https://github.com/rust-ammonia/ammonia/commit/d2ae1547f478bd84d158bc5e57f5d31437dc4d8dWEB
- https://github.com/rust-ammonia/ammoniaPACKAGE
- https://rustsec.org/advisories/RUSTSEC-2026-0213.htmlWEB
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
Exploitation requires specific conditions, or the impact is limited.
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
Related CVEs
- CVE-2019-15542HIGH
Uncontrolled recursion leads to abort in HTML serialization
- CVE-2026-115906MEDIUM
zip: AES Entry HMAC Authentication Bypass on Premature EOF
- CVE-2026-63430MEDIUM
ammonia: mXSS via MathML `annotation-xml` encoding strip
- CVE-2026-35374MEDIUM
split: TOCTOU output-open allows truncating a swapped file