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.
For example:
<math><mi><svg><gadget></svg></mi></math>.math, mi, and the gadget, but not svg.<math><mi><gadget></mi></math>.As far as we know, the gadget can only be written using a tag that is parsed as raw text in HTML. These elements are:
Applications that do not explicitly allow any of these tags should not be affected, since none are allowed by default.
This vulnerability was reported by Roger Meyer.
{
"license": "CC0-1.0"
}