MapLibre GL JS: XSS Sanitizer Bypass in DOM.sanitize() via Live NamedNodeMap Removal Skip
DOM.sanitize() in src/util/dom.ts iterated elem.attributes (a live NamedNodeMap) while calling elem.removeAttribute() in the same loop. Removing an attribute shifts subsequent attributes down by one index, causing the iterator to skip the adjacent attribute. An attacker can provide an HTML payload with consecutive dangerous attributes (such as <details open onload="1" ontoggle="…">). The first attribute is stripped while the second survives and executes upon insertion into innerHTML via the attribution control without …