# RUSTSEC-2026-0213: XSS in ammonia via SVG animate and set animation tags

- Database: RustSec
- Published: 2026-07-21
- Modified: 2026-09-30

## Tracked as

- [CVE-2026-102342](https://cve.now/CVE-2026-102342.md): ammonia allows stored XSS through unsanitized SVG animate and set attributes

## Also published as

- [GHSA-M6MH-2HW2-555X](https://cve.now/GHSA-M6MH-2HW2-555X.md) (GitHub)

## Affected versions

- ammonia (crates.io): fixed in 3.3.3; from 4.0.0, fixed in 4.0.3; from 4.1.0, fixed in 4.1.4

## Description

The following SVG will produce a link with a javascript scheme.
If the user clicks this link, they will run it.

```xml
<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>
```

Ammonia did not apply attribute filters based on `attributeName`,
so the contents of the `to`, `from`, and `values` tags were not sanitized as URLs.

Applications that do not explicitly allow either of these tags should not be affected,
since neither are allowed by default.

---

**Discovered by:** [Younghun Ko (@koyokr)](https://github.com/koyokr)

## References

- https://crates.io/crates/ammonia
- https://rustsec.org/advisories/RUSTSEC-2026-0213.html

Page: https://cve.now/RUSTSEC-2026-0213

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
