Incorrect handling of embedded SVG and MathML leads to mutation XSS
The MathML text integration points (mi, mo, mn, ms, mtext) and SVG foreignObject can be made to contain a tag in the other one's namespace (a MathML integration point with a child in the SVG namespace, or vice versa) without the root tag that switches out of the HTML namespace. If the attacker can construct input that parses differently in as HTML than as foreign XML, they can inject arbitrary JavaScript code into the user's browser.
Recorded fixes — ammonia: 3.3.5 or 4.1.9 or 4.2.5. Check your release branch.
Exploitation not established
| Affected range | Recorded fix |
|---|---|
| From 0.0.0-0 before 3.3.5Semantic versions | 3.3.5 |
| From 4.0.0 before 4.1.9Semantic versions | 4.1.9 |
| From 4.2.0 before 4.2.5Semantic versions | 4.2.5 |
Version evidence: OSV · RUSTSEC-2026-0533
View original version evidence
{
"ranges": [
{
"events": [
{
"introduced": "0.0.0-0"
},
{
"fixed": "3.3.5"
},
{
"introduced": "4.0.0"
},
{
"fixed": "4.1.9"
},
{
"introduced": "4.2.0"
},
{
"fixed": "4.2.5"
}
],
"type": "SEMVER"
}
],
"versions": []
}