cve.bz

CVE-2026-102342 rust-ammonia ammonia: Cross-site Scripting

5.4 mediumEPSS 0.3%Fix available

Medium (5.4) in rust-ammonia ammonia. EPSS 0.3% estimated probability of exploitation activity in the next 30 days. Fixed in ammonia 3.3.3, 4.0.3, 4.1.4.

On this page
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.

Severity

CVSS 3.1

5.4 medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
EPSS
0.3% (unchanged from 0.3% a week ago; 0.4% 30 days ago) estimated probability of exploitation activity in the next 30 days; 20th percentile. Scored 2026-11-17. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2026-10-13. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-79 Improper Neutralization of Input During Web Page Generation (Cross-site Scripting)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Deferred: the NVD does not plan to analyze it
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-102342 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-102342?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-102342?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-102342 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
rust-ammonia ammonia< 3.3.3
rust-ammonia ammonia>= 4.0.0, < 4.0.3
rust-ammonia ammonia>= 4.1.2, < 4.1.4

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-m6mh-2hw2-555xcrates.ioammonia<3.3.33.3.3
GHSA-m6mh-2hw2-555xcrates.ioammonia>=4.0.0 <4.0.34.0.3
GHSA-m6mh-2hw2-555xcrates.ioammonia>=4.1.2 <4.1.44.1.4
RUSTSEC-2026-0213crates.ioammonia>=0.0.0-0 <3.3.3
>=4.0.0 <4.0.3
>=4.1.0 <4.1.4
3.3.3, 4.0.3, 4.1.4

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13rust-ammoniano fix listedDEBIAN-CVE-2026-102342
Debian14rust-ammonia4.1.4-1DEBIAN-CVE-2026-102342
Ubuntu22.04:LTS, 24.04:LTS, 26.04:LTS and 1 morerust-ammoniano fix listedUBUNTU-CVE-2026-102342
Azure Linux3rustno fix listedAZL-108048 AZL-108051

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

A MODERATE severity stored cross-site scripting (XSS) flaw was found in ammonia, a Rust HTML sanitization library that is shipped in Red Hat Enterprise Linux (via the rust and rust-toolset components) and bundled in other Red Hat products such as Red Hat Ansible Automation Platform, Red Hat Satellite, and Red Hat In-Vehicle OS through the ammonia crate or its nh3 Python bindings. When an application using ammonia is configured to permit the SVG animate or set elements, the sanitizer fails to neutralize animations that set a link's href attribute to a javascript: URI. A remote attacker who can store crafted SVG content in such an application can create a clickable link that executes attacker-controlled script in the application's origin when a victim clicks it, allowing actions to be performed on behalf of the victim and access to their session data. The Red Hat CVSS 3.1 score of 5.4 (AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N) matches the upstream severity. Ansible Automation Platform components whose bundled ammonia version is outside the affected range are not affected because the vulnerable code is not present. For in-support Red Hat products the fix is currently deferred: the flaw is rated MODERATE with a CVSS score below 7.0, which does not meet Red Hat's threshold for filing fix trackers at this severity, and the residual risk is limited to applications that explicitly allow the SVG animate or set tags, with exploitation further requiring a victim to click the crafted link. The affected Fedora and EPEL python-nh3 packages are delegated to the community, where a fix is being pursued; streams that are out of support scope will not receive a fix through Red Hat update channels.

Red Hat's mitigation

A workaround exists for applications that use ammonia: remove the SVG animate and set elements from the sanitizer's allowed-tags configuration. Applications that do not permit these tags are not affected by this flaw. Otherwise, upgrade to an upstream release containing the fix (ammonia 3.3.3, 4.0.3, or 4.1.4, depending on the major version in use); for Red Hat products, apply updates when they become available through the appropriate support channels.

ProductPackageStateAdvisory
Ansible Automation Orchestrator 2026ansible-automation-platform/automation-orchestrator-backend-rhel9Fix deferred
Red Hat Ansible Automation Platform 2ansible-automation-platform-26/controller-rhel9Fix deferred
Red Hat Ansible Automation Platform 2ansible-automation-platform-26/eda-controller-rhel9Not affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-26/gateway-rhel9Not affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-26/hub-rhel9Fix deferred
Red Hat Ansible Automation Platform 2ansible-automation-platform-27/controller-rhel9Not affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-27/eda-controller-rhel9Not affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-27/gateway-rhel9Not affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-27/hub-rhel9Not affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-27/metrics-service-rhel9Not affected
Red Hat Ansible Automation Platform 2ansible-automation-platform/automation-dashboard-rhel9Not affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-tech-preview/metrics-service-rhel9Not affected
Red Hat Ansible Automation Platform 2python3.11-nh3Fix deferred
Red Hat Ansible Automation Platform 2python3.12-nh3Fix deferred
Red Hat Enterprise Linux 10rustFix deferred
Red Hat Enterprise Linux 8rust-toolset:rhel8/rustFix deferred
Red Hat Enterprise Linux 9rustFix deferred
Red Hat Satellite 6python3.12-nh3Fix deferred

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-102342.

Attack patterns (CAPEC)

  • CAPEC-63 Cross-Site Scripting (XSS) Likelihood: High · Severity: Very High
  • CAPEC-85 AJAX Footprinting Likelihood: High · Severity: Low
  • CAPEC-209 XSS Using MIME Type Mismatch Severity: Medium
  • CAPEC-588 DOM-Based XSS Likelihood: High · Severity: Very High
  • CAPEC-591 Reflected XSS Likelihood: High · Severity: Very High
  • CAPEC-592 Stored XSS Likelihood: High · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON