Stored cross-site scripting in ammonia via SVG animate and set
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- Low · Low · None
- Fix status
- Partial Red Hat: 6 without a fix
Attack profile from CVSS 3.1 · CNA. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-79.
Summary
The ammonia Rust library is affected before 3.3.3, from 4.0.0 before 4.0.3, and from 4.1.2 before 4.1.4. Applications that allow SVG animate or set elements can keep an animation targeting href with a javascript scheme value, so sanitized SVG holds a script-bearing link (CWE-79). An attacker with low privileges can store such content, and script runs in the application's origin when a user clicks the link.
Written with Claude Haiku 5.5 from the sources below · 2026-10-27
Description from the CNA
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| rust-ammonia | ammonia | before 3.3.3; 4.0.0 to before 4.0.3; 4.1.2 to before 4.1.4 | 3.3.3, 4.0.3, 4.1.4 | Patch available | CNA |
| — | ammonia (crates.io) | before 3.3.3 | 3.3.3 | Patch available | GHSA-m6mh-2hw2-555x |
| — | ammonia (crates.io) | 4.0.0 to before 4.0.3 | 4.0.3 | Patch available | GHSA-m6mh-2hw2-555x |
| — | ammonia (crates.io) | 4.1.2 to before 4.1.4 | 4.1.4 | Patch available | GHSA-m6mh-2hw2-555x |
- ammonia Vendorrust-ammonia Affected before 3.3.3; 4.0.0 to before 4.0.3; 4.1.2 to before 4.1.4 Fixed in 3.3.3, 4.0.3, 4.1.4 Patch available CNA
- ammonia (crates.io) Vendor— Affected before 3.3.3 Fixed in 3.3.3 Patch available GHSA-m6mh-2hw2-555x
- ammonia (crates.io) Vendor— Affected 4.0.0 to before 4.0.3 Fixed in 4.0.3 Patch available GHSA-m6mh-2hw2-555x
- ammonia (crates.io) Vendor— Affected 4.1.2 to before 4.1.4 Fixed in 4.1.4 Patch available GHSA-m6mh-2hw2-555x
Remediation
Upgrade ammonia to 3.3.3, 4.0.3, or 4.1.4. Red Hat lists Ansible Automation Orchestrator 2026, Red Hat Ansible Automation Platform 2, Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9, Red Hat Enterprise Linux 10, and Red Hat Satellite 6 as affected with no fix available.
Written with Claude Haiku 5.5 from the sources below · 2026-10-27
- Fix · CNA ammonia (rust-ammonia) Fixed in 3.3.3, 4.0.3, 4.1.4
- Fix · GHSA-m6mh-2hw2-555x ammonia (crates.io) Fixed in 3.3.3 Advisory →
- Fix · GHSA-m6mh-2hw2-555x ammonia (crates.io) Fixed in 4.0.3 Advisory →
- Fix · GHSA-m6mh-2hw2-555x ammonia (crates.io) Fixed in 4.1.4 Advisory →
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Ansible Automation Orchestrator 2026 | Affected | No fix yet: Fix deferred |
| Red Hat Ansible Automation Platform 2 | Affected | No fix yet: Fix deferred |
| Red Hat Enterprise Linux 10 | Affected | No fix yet: Fix deferred |
| Red Hat Enterprise Linux 8 | Affected | No fix yet: Fix deferred |
| Red Hat Enterprise Linux 9 | Affected | No fix yet: Fix deferred |
| Red Hat Satellite 6 | Affected | No fix yet: Fix deferred |
Not affected: 1 product
- Red Hat Ansible Automation Platform 2
Timeline
- 2026-10-13 Threatist record created from CVE-2026-102342
- 2026-10-13 CISA SSVC decision points changed
- 2026-10-13 Priority changed: MEDIUM → LOW
- 2026-10-15 Affected versions changed · Red Hat
- 2026-10-15 CVSS score added · Red Hat
References
Other 12
- https://github.com/rust-ammonia/ammonia/security/advisories/GHSA-m6mh-2hw2-555x
- https://github.com/rust-ammonia/ammonia/pull/250
- https://github.com/rust-ammonia/ammonia/pull/251
- https://github.com/rust-ammonia/ammonia/pull/252
- https://github.com/rust-ammonia/ammonia/commit/9394bd81179e756cb911314deabd943f1a9c8989
- https://github.com/rust-ammonia/ammonia/commit/9e3335e2dd8ab07346ff7997f20662a3da4023f6
- https://github.com/rust-ammonia/ammonia/commit/d2ae1547f478bd84d158bc5e57f5d31437dc4d8d
- https://github.com/rust-ammonia/ammonia/releases/tag/v3.3.3
- https://github.com/rust-ammonia/ammonia/releases/tag/v4.0.3
- https://github.com/rust-ammonia/ammonia/releases/tag/v4.1.4
- https://github.com/rust-ammonia/ammonia
- https://rustsec.org/advisories/RUSTSEC-2026-0213.html
More rust-ammonia vulnerabilities
- TI-2026-74991 Mutation cross-site scripting in ammonia via MathML annotation-xml CVSS 4.0MEDIUM 6.3
Sources
- CVE-2026-102342 · CVE Program
- CVE-2026-102342 · NVD
- FIRST EPSS
- CVE-2026-102342 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences