ammonia allows stored XSS through unsanitized SVG animate and set attributes
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-102342
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 8 Nov 2026, 02:33 UTC · Revision 1
Source evidence
ammonia allows stored XSS through unsanitized SVG animate and set attributes
core-osv · Original sourcePublished 13 Oct 2026, 14:28 UTC
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.
osv:CVE-2026-102342
Complete source record
{
"id": "85612f68732346968cb2fab92c6ba8d64ae840f896782034136b3da990c1f4b6",
"url": "https://osv.dev/vulnerability/CVE-2026-102342",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "ammonia allows stored XSS through unsanitized SVG animate and set attributes",
"summary": "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.",
"evidence": "osv:CVE-2026-102342",
"products": [],
"severity": "medium",
"structured": {
"id": "CVE-2026-102342",
"aliases": [
"CVE-2026-102342",
"GHSA-m6mh-2hw2-555x",
"RUSTSEC-2026-0213"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/rust-ammonia/ammonia",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "ad4ffb57b3fcf932b5a80c0f021c7ae8c76899e4"
},
{
"introduced": "6a1f85654cd90c2d131baf83267c5846ec8a7625"
},
{
"fixed": "c9e22b62ba43684449f85af131afebca2f7be54b"
},
{
"introduced": "de0297111a3a1273275b670960bcd47a0481718e"
},
{
"fixed": "fba751216ad8eb7a4e71882350016f810e4d925a"
},
{
"fixed": "9394bd81179e756cb911314deabd943f1a9c8989"
},
{
"fixed": "9e3335e2dd8ab07346ff7997f20662a3da4023f6"
},
{
"fixed": "d2ae1547f478bd84d158bc5e57f5d31437dc4d8d"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "0"
},
{
"fixed": "3.3.3"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"range": [
{
"introduced": "4.0.0"
},
{
"fixed": "4.0.3"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"range": [
{
"introduced": "4.1.2"
},
{
"fixed": "4.1.4"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"range": [
{
"fixed": "9394bd81179e756cb911314deabd943f1a9c8989"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "9e3335e2dd8ab07346ff7997f20662a3da4023f6"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "d2ae1547f478bd84d158bc5e57f5d31437dc4d8d"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "ad4ffb57b3fcf932b5a80c0f021c7ae8c76899e4"
}
],
"source": "REFERENCES_TAG",
"original_tag": "v3.3.3"
},
{
"range": [
{
"fixed": "c9e22b62ba43684449f85af131afebca2f7be54b"
}
],
"source": "REFERENCES_TAG",
"original_tag": "v4.0.3"
},
{
"range": [
{
"fixed": "fba751216ad8eb7a4e71882350016f810e4d925a"
}
],
"source": "REFERENCES_TAG",
"original_tag": "v4.1.4"
}
]
}
}
],
"versions": [
"v3.3.2",
"v4.0.2",
"v4.1.3",
"v4.0.1",
"v3.3.1",
"v3.3.0",
"v4.0.0",
"v4.1.1",
"v4.1.0",
"v3.2.1",
"v3.2.0",
"v3.1.4",
"v3.1.3",
"v3.1.2",
"v2.1.3",
"v2.1.2",
"v3.1.1",
"v3.1.0",
"v3.0.0",
"v2.1.1",
"v2.1.0",
"v2.0.0",
"v1.2.0",
"v1.1.0",
"v1.0.1",
"v1.0.0",
"v1.0.0-rc3",
"v1.0.0-rc2",
"v1.0.0-rc1",
"v0.7.0",
"v0.6.0",
"v0.5.0",
"v0.4.0",
"v0.2.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-102342.json"
}
}
],
"modified": "2026-10-28T02:30:52.789760956Z",
"provider": "osv",
"references": [
"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/CVEProject/cvelistV5/tree/main/cves/2026/102xxx/CVE-2026-102342.json",
"https://github.com/rust-ammonia/ammonia/security/advisories/GHSA-m6mh-2hw2-555x",
"https://nvd.nist.gov/vuln/detail/CVE-2026-102342",
"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/pull/250",
"https://github.com/rust-ammonia/ammonia/pull/251",
"https://github.com/rust-ammonia/ammonia/pull/252"
],
"provider_metadata": {
"cwe_ids": [
"CWE-79"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/102xxx/CVE-2026-102342.json"
}
},
"related_cves": [
{
"value": "CVE-2026-102342",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 521821,
"published_at": "2026-10-13T14:28:50.011+00:00"
}