{"id":"CVE-2026-102342","aliases":["AZL-108048","AZL-108051","DEBIAN-CVE-2026-102342","EUVD-2026-98766","GHSA-m6mh-2hw2-555x","RUSTSEC-2026-0213","UBUNTU-CVE-2026-102342"],"status":"published","title":"ammonia allows stored XSS through unsanitized SVG animate and set attributes","description":"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":{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-12","score":0.00272,"percentile":0.1978,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-79"],"published":"2026-07-21T12:00:00Z","modified":"2026-11-11T02:48:53Z","fixes":[{"ecosystem":"crates.io","package":"ammonia","fixed_in":["3.3.2","4.0.3","4.1.4","3.3.3"],"sources":["ghsa","osv"]},{"ecosystem":"Debian:14","package":"rust-ammonia","fixed_in":["4.1.4-1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"ammonia","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.3.2"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"ammonia","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.0.0"},{"last_affected":"4.0.2"},{"fixed":"4.0.3"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"ammonia","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.1.2"},{"last_affected":"4.1.3"},{"fixed":"4.1.4"}]}]},{"source":"osv","ecosystem":"Azure Linux:3","package":"rust","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"1.75.0-31"}]}]},{"source":"osv","ecosystem":"Azure Linux:3","package":"rust","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.85.0"},{"last_affected":"1.96.1-2"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"rust-ammonia","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.2.1-1","3.3.0-1","4.0.0-1","4.0.0-2","4.0.0-3","4.1.1-1","4.1.2-1","4.1.2-2","4.1.3-1","4.1.4-1","4.2.3-1"]},{"source":"osv","ecosystem":"Debian:13","package":"rust-ammonia","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["4.0.0-3","4.1.1-1","4.1.2-1","4.1.2-2","4.1.3-1","4.1.4-1","4.2.3-1"]},{"source":"osv","ecosystem":"Debian:14","package":"rust-ammonia","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.1.4-1"}]}],"versions":["4.0.0-3","4.1.1-1","4.1.2-1","4.1.2-2","4.1.3-1"]},{"source":"osv","ecosystem":"crates.io","package":"ammonia","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"3.3.3"}]}]},{"source":"osv","ecosystem":"crates.io","package":"ammonia","ranges":[{"type":"SEMVER","events":[{"introduced":"4.0.0"},{"fixed":"4.0.3"}]}]},{"source":"osv","ecosystem":"crates.io","package":"ammonia","ranges":[{"type":"SEMVER","events":[{"introduced":"4.1.2"},{"fixed":"4.1.4"}]}]},{"source":"osv","ecosystem":"crates.io","package":"ammonia","ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"3.3.3"},{"introduced":"4.0.0"},{"fixed":"4.0.3"},{"introduced":"4.1.0"},{"fixed":"4.1.4"}]}]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"rust-ammonia","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.1.0-2","3.1.2-1"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"rust-ammonia","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.2.1-1","3.3.0-1"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"rust-ammonia","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["4.1.2-1","4.1.4-1"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"rust-ammonia","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["4.0.0-3","4.1.2-1"]}],"products":[{"vendor":"rust-ammonia","product":"ammonia"}],"references":[{"url":"https://github.com/rust-ammonia/ammonia/security/advisories/GHSA-m6mh-2hw2-555x","tags":["x_refsource_CONFIRM","advisory","web","report"]},{"url":"https://github.com/rust-ammonia/ammonia/pull/250","tags":["x_refsource_MISC","fix","web","report"]},{"url":"https://github.com/rust-ammonia/ammonia/pull/251","tags":["x_refsource_MISC","fix","web","report"]},{"url":"https://github.com/rust-ammonia/ammonia/pull/252","tags":["x_refsource_MISC","fix","web","report"]},{"url":"https://github.com/rust-ammonia/ammonia/commit/9394bd81179e756cb911314deabd943f1a9c8989","tags":["x_refsource_MISC","fix","web","report"]},{"url":"https://github.com/rust-ammonia/ammonia/commit/9e3335e2dd8ab07346ff7997f20662a3da4023f6","tags":["x_refsource_MISC","fix","web","report"]},{"url":"https://github.com/rust-ammonia/ammonia/commit/d2ae1547f478bd84d158bc5e57f5d31437dc4d8d","tags":["x_refsource_MISC","fix","web","report"]},{"url":"https://github.com/rust-ammonia/ammonia/releases/tag/v3.3.3","tags":["x_refsource_MISC","web","report"]},{"url":"https://github.com/rust-ammonia/ammonia/releases/tag/v4.0.3","tags":["x_refsource_MISC","web","report"]},{"url":"https://github.com/rust-ammonia/ammonia/releases/tag/v4.1.4","tags":["x_refsource_MISC","web","report"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2026-0213.html","tags":["web","advisory"]},{"url":"https://github.com/advisories/GHSA-m6mh-2hw2-555x"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-102342","tags":["web","advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/102xxx/CVE-2026-102342.json","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2026-102342","tags":["advisory"]},{"url":"https://github.com/rust-ammonia/ammonia","tags":["package"]},{"url":"https://crates.io/crates/ammonia","tags":["package"]},{"url":"https://ubuntu.com/security/CVE-2026-102342","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-102342","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2026-102342","title":"ammonia allows stored XSS through unsanitized SVG animate and set attributes","description":"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.","status":"published","published":"2026-10-13T14:28:50.011Z","modified":"2026-10-13T20:23:10.66Z","cvss":[{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","level":"medium","assessor":"cna"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T13:38:54.394896Z"}],"euvd":[{"id":"EUVD-2026-98766","description":"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.","status":"published","published":"2026-10-13T14:28:50Z","modified":"2026-10-13T20:23:10Z","cvss":[{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"updated_at":"2026-11-02T17:27:18.393051Z"}],"ghsa":[{"id":"GHSA-m6mh-2hw2-555x","title":"Ammonia: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')","description":"The following SVG will produce a link with a `javascript` scheme. If the user clicks this link, they will run it.\n\n```svg\n\u003csvg xmlns=\"http://www.w3.org/2000/svg\"\u003e\n  \u003ca\u003e\n    \u003cset attributeName=\"href\" to=\"javascript:alert('SET_XSS')\"\u003e\u003c/set\u003e\n    \u003ctext y=\"30\"\u003eClick set\u003c/text\u003e\n  \u003c/a\u003e\n\u003c/svg\u003e\n```\n\n### Impact\n\nAllows stored XSS in applications that allow the `animate` and `set` tags.\n\n### Patches\n\nFixed in 3.3.3, 4.0.3, and 4.1.4\n\n### Workarounds\n\nDo not enable the `animate` or `set` tags.","status":"published","published":"2026-09-29T23:09:16Z","modified":"2026-09-29T23:09:17Z","cvss":[{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:41:22.654187Z"}],"nvd":[{"id":"CVE-2026-102342","description":"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.","status":"published","published":"2026-10-13T15:17:30.177Z","modified":"2026-10-16T20:04:29.76Z","cvss":[{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","level":"medium","assessor":"secondary"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:12:57.132005Z"}],"osv":[{"id":"CVE-2026-102342","title":"ammonia allows stored XSS through unsanitized SVG animate and set attributes","description":"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.","status":"published","published":"2026-10-13T14:28:50.011Z","modified":"2026-11-11T10:47:22.484377075Z","cvss":[{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"cwes":["CWE-79"],"updated_at":"2026-11-11T03:21:33.987049Z"},{"id":"DEBIAN-CVE-2026-102342","description":"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.","status":"published","published":"2026-10-13T15:17:30.177Z","modified":"2026-10-23T18:05:30.940957693Z","cvss":[{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"updated_at":"2026-11-02T15:45:48.903138Z"},{"id":"GHSA-m6mh-2hw2-555x","title":"Ammonia: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')","description":"The following SVG will produce a link with a `javascript` scheme. If the user clicks this link, they will run it.\n\n```svg\n\u003csvg xmlns=\"http://www.w3.org/2000/svg\"\u003e\n  \u003ca\u003e\n    \u003cset attributeName=\"href\" to=\"javascript:alert('SET_XSS')\"\u003e\u003c/set\u003e\n    \u003ctext y=\"30\"\u003eClick set\u003c/text\u003e\n  \u003c/a\u003e\n\u003c/svg\u003e\n```\n\n### Impact\n\nAllows stored XSS in applications that allow the `animate` and `set` tags.\n\n### Patches\n\nFixed in 3.3.3, 4.0.3, and 4.1.4\n\n### Workarounds\n\nDo not enable the `animate` or `set` tags.","status":"published","published":"2026-09-29T23:09:16Z","modified":"2026-09-29T23:25:44.070111673Z","cvss":[{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T15:46:51.463834Z"},{"id":"UBUNTU-CVE-2026-102342","description":"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.","status":"published","published":"2026-10-13T15:17:00Z","modified":"2026-10-17T12:59:44.028170972Z","cvss":[{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"updated_at":"2026-11-02T16:55:58.519486Z"},{"id":"AZL-108048","title":"CVE-2026-102342 affecting package rust 1.75.0-31","description":"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.","status":"published","published":"2026-10-13T15:17:30Z","modified":"2026-10-15T05:37:09Z","updated_at":"2026-11-02T15:28:01.725816Z"},{"id":"AZL-108051","title":"CVE-2026-102342 affecting package rust 1.96.1-2","description":"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.","status":"published","published":"2026-10-13T15:17:30Z","modified":"2026-10-15T05:37:09Z","updated_at":"2026-11-02T15:28:01.725816Z"},{"id":"RUSTSEC-2026-0213","title":"XSS in ammonia via SVG `animate` and `set` animation tags","description":"The following SVG will produce a link with a javascript scheme.\nIf the user clicks this link, they will run it.\n\n```xml\n\u003csvg xmlns=\"http://www.w3.org/2000/svg\"\u003e\n  \u003ca\u003e\n    \u003cset attributeName=\"href\" to=\"javascript:alert('SET_XSS')\"\u003e\u003c/set\u003e\n    \u003ctext y=\"30\"\u003eClick set\u003c/text\u003e\n  \u003c/a\u003e\n\u003c/svg\u003e\n```\n\nAmmonia did not apply attribute filters based on `attributeName`,\nso the contents of the `to`, `from`, and `values` tags were not sanitized as URLs.\n\nApplications that do not explicitly allow either of these tags should not be affected,\nsince neither are allowed by default.\n\n---\n\n**Discovered by:** [Younghun Ko (@koyokr)](https://github.com/koyokr)","status":"published","published":"2026-07-21T12:00:00Z","modified":"2026-09-30T07:15:39Z","updated_at":"2026-11-02T15:53:40.430679Z"}]}}
