{"schema":"threatline.record/2","record":{"id":"CVE-2026-63430","aliases":["GHSA-9jh8-v38h-cvhr","RUSTSEC-2026-0193"],"summary":"ammonia: mXSS  via MathML `annotation-xml` encoding strip","details":"If a certain set of MathML tags are enabled, an attacker can inject arbitrary JavaScript code into the user's browser.\n\nThe `annotation-xml` tag has slightly different behavior than the other \"integration point\"\ntags in MathML and SVG, but ammonia didn't handle it, so it didn't correctly\nstrip the namespace-incompatible tags.\n\nThis vulnerability only has an effect when the `math` and `annotation-xml` tags\nare both enabled, but the `encoding` attribute is disabled, because it relies\non the following sequence of steps:\n\n1. User writes code like `<math><annotation-xml encoding=\"text/html\"><gadget></annotation-xml></math>`.\n2. Namespace filtering checks the DOM, and it passes. `<gadget>` is parsed as HTML.\n3. Attribute filter strips it down to `<math><annotation-xml><gadget></annotation-xml></math>`. Because the encoding attribute is gone, `<gadget>` is now parsed as MathML.\n4. The gadget is written in such a way that it exploits the parsing differences between HTML and MathML.\n\nAdditionally, the gadget can only be written using a tag that is parsed as raw text in HTML.\nThese [elements] are:\n\n* title\n* textarea\n* xmp\n* iframe\n* noembed\n* noframes\n* plaintext\n* noscript\n* style\n* script\n\nApplications that do not explicitly allow any of these tags should not be affected, since none are allowed by default.\n\n[elements]: https://github.com/servo/html5ever/blob/045a0378f2b0f8d4a350793899cf722a2a9b3d11/html5ever/src/tree_builder/rules.rs\n\n### Impact\n\nLow: Requires both MathML and at least one raw-text HTML tag to be enabled, and most websites don't enable either of those.\n\n### Patches\n\n- https://github.com/rust-ammonia/ammonia/pull/245 (released in 4.1.3)\n- https://github.com/rust-ammonia/ammonia/pull/244 (released in 4.0.2)\n- https://github.com/rust-ammonia/ammonia/pull/243 (released in 3.3.2)\n\n### Workarounds\n\nCall <code>builder.[add_clean_content_tags](https://docs.rs/ammonia/latest/ammonia/struct.Builder.html#method.add_clean_content_tags)(\"annotation-xml\")</code> to remove the annotation-xml element and all of its children, including the XSS gadget.","categories":["Libraries & packages"],"product":"ammonia","vendor":"rust-ammonia","ecosystem":"rust","affected_ranges":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-9jh8-v38h-cvhr","source_modified_at":"2026-10-22T14:06:14Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"rust","name":"ammonia"},"range":"< 3.3.2"},{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-9jh8-v38h-cvhr","source_modified_at":"2026-10-22T14:06:14Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"rust","name":"ammonia"},"range":">= 4.0.0, < 4.0.2"},{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-9jh8-v38h-cvhr","source_modified_at":"2026-10-22T14:06:14Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"rust","name":"ammonia"},"range":">= 4.1.0, < 4.1.3"},{"source":"CVE List","source_url":"https://www.cve.org/CVERecord?id=CVE-2026-63430","source_modified_at":"2026-10-15T20:25:49.464Z","fetched_at":"2026-10-23T18:45:31.882637Z","product":"ammonia","vendor":"rust-ammonia","versions":[{"version":"< 3.3.2","status":"affected"},{"version":">= 4.0.0, < 4.0.2","status":"affected"},{"version":">= 4.1.0, < 4.1.3","status":"affected"}],"defaultStatus":null},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-9jh8-v38h-cvhr","source_modified_at":"2026-10-22T14:16:23.103650626Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"crates.io","name":"ammonia","purl":"pkg:cargo/ammonia"},"ranges":[{"events":[{"introduced":"0"},{"fixed":"3.3.2"}],"type":"SEMVER"}],"versions":[]},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-9jh8-v38h-cvhr","source_modified_at":"2026-10-22T14:16:23.103650626Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"crates.io","name":"ammonia","purl":"pkg:cargo/ammonia"},"ranges":[{"events":[{"introduced":"4.0.0"},{"fixed":"4.0.2"}],"type":"SEMVER"}],"versions":[]},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-9jh8-v38h-cvhr","source_modified_at":"2026-10-22T14:16:23.103650626Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"crates.io","name":"ammonia","purl":"pkg:cargo/ammonia"},"ranges":[{"events":[{"introduced":"4.1.0"},{"fixed":"4.1.3"}],"type":"SEMVER"}],"versions":[]}],"fixed_versions":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-9jh8-v38h-cvhr","source_modified_at":"2026-10-22T14:06:14Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"rust","name":"ammonia"},"version":"3.3.2"},{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-9jh8-v38h-cvhr","source_modified_at":"2026-10-22T14:06:14Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"rust","name":"ammonia"},"version":"4.0.2"},{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-9jh8-v38h-cvhr","source_modified_at":"2026-10-22T14:06:14Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"rust","name":"ammonia"},"version":"4.1.3"},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-9jh8-v38h-cvhr","source_modified_at":"2026-10-22T14:16:23.103650626Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"crates.io","name":"ammonia","purl":"pkg:cargo/ammonia"},"version":"3.3.2"},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-9jh8-v38h-cvhr","source_modified_at":"2026-10-22T14:16:23.103650626Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"crates.io","name":"ammonia","purl":"pkg:cargo/ammonia"},"version":"4.0.2"},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-9jh8-v38h-cvhr","source_modified_at":"2026-10-22T14:16:23.103650626Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"crates.io","name":"ammonia","purl":"pkg:cargo/ammonia"},"version":"4.1.3"}],"cvss":6.3,"severity":"Medium","kev":{"listed":false},"epss":{"probability":0.00554,"percentile":0.4554,"score_date":"2026-10-23"},"published_at":"2026-10-15T18:10:35.869Z","modified_at":"2026-10-22T14:16:23.103650626Z","provenance":[{"source":"GitHub Advisory Database","url":"https://github.com/advisories/GHSA-9jh8-v38h-cvhr","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-22T14:06:14Z"},{"source":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-63430","fetched_at":"2026-10-23T18:45:31.882637Z","source_modified_at":"2026-10-15T20:25:49.464Z"},{"source":"OSV","url":"https://osv.dev/vulnerability/GHSA-9jh8-v38h-cvhr","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-22T14:16:23.103650626Z"},{"source":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-63430","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-23"}],"sources":["GitHub Advisory Database","CVE List","OSV","EPSS"],"references":[{"source":"CVE List","url":"https://github.com/rust-ammonia/ammonia/security/advisories/GHSA-9jh8-v38h-cvhr","tags":["exploit"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-63430","source":"GitHub Advisory Database"},{"source":"CVE List","url":"https://github.com/rust-ammonia/ammonia/pull/243","tags":["x_refsource_MISC"]},{"source":"CVE List","url":"https://github.com/rust-ammonia/ammonia/pull/244","tags":["x_refsource_MISC"]},{"source":"CVE List","url":"https://github.com/rust-ammonia/ammonia/pull/245","tags":["x_refsource_MISC"]},{"source":"CVE List","url":"https://github.com/rust-ammonia/ammonia/commit/004bf2cee4288f74a6ee619d589e3e90c24c09ca","tags":["x_refsource_MISC"]},{"source":"CVE List","url":"https://github.com/rust-ammonia/ammonia/commit/7ac3fd3145236f28857eeecbadb544c8659cba31","tags":["x_refsource_MISC"]},{"source":"CVE List","url":"https://github.com/rust-ammonia/ammonia/commit/b51bf4f9749ed3cd518330105f20a2c39c9ee274","tags":["x_refsource_MISC"]},{"source":"CVE List","url":"https://github.com/rust-ammonia/ammonia/releases/tag/v3.3.2","tags":["x_refsource_MISC"]},{"source":"CVE List","url":"https://github.com/rust-ammonia/ammonia/releases/tag/v4.0.2","tags":["x_refsource_MISC"]},{"source":"CVE List","url":"https://github.com/rust-ammonia/ammonia/releases/tag/v4.1.3","tags":["x_refsource_MISC"]},{"source":"CVE List","url":"https://ivan09999.github.io/ammonia-mxss","tags":["x_refsource_MISC"]},{"source":"CVE List","url":"https://rustsec.org/advisories/RUSTSEC-2026-0193.html","tags":["x_refsource_MISC"]},{"url":"https://github.com/advisories/GHSA-9jh8-v38h-cvhr","source":"GitHub Advisory Database"}],"locations":[],"motoko_assessment":{"status":"requires_architecture_review","automatic_remediation":false},"cve_state":"PUBLISHED","ssvc":{"exploitation":"poc","automatable":"yes","technical_impact":"partial","assessed_at":"2026-10-15T20:24:18.831464Z"},"classification":{"method":"product-first software-layer rules","rules_version":"2.1","matched_on":"ecosystem","confidence":"heuristic","reviewed":false},"change_timestamp":"2026-10-22T14:16:23.103650626Z","content_hash":"78721cb37ac81541d362071b6d958b6e4240c796768bb676ce1e49b8c3ae47f0"}}
