CVE-2026-85061 MapLibre GL JS: XSS Sanitizer Bypass in DOM.sanitize() via Live NamedNodeMap Removal Skip
Attackers can bypass XSS sanitization in MapLibre GL JS by exploiting a live NamedNodeMap iteration bug, allowing script execution via malicious attribution strings.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-85061?
CVE-2026-85061 is a critical cross-site scripting vulnerability in maplibre-gl-js, published on 3 Sep 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
MapLibre GL JS is an interactive vector tile map library for web browsers. Prior to 6.4.1, DOM.sanitize() in src/util/dom.ts iterates elem.attributes as a live NamedNodeMap while removeAttributes() removes attributes from the same collection, shifting indexes and skipping an adjacent dangerous attribute. An attacker who controls untrusted third-party style attribution strings or user-supplied custom attributions can supply consecutive dangerous attributes, causing an attribute such as onload or ontoggle to survive sanitization and execute when the attribution control inserts the content into innerHTML. A victim must render the affected map content for the script to execute. This issue is fixed in version 6.4.1.
Weakness: CWE-79
Which versions are affected by CVE-2026-85061?
2 open source packages ship an affected version, including maplibre-gl.
| Package | Affected | Fixed in |
|---|---|---|
maplibre-gl npm | All versions | 6.4.1 |
maplibre-gl npm | All versions | 6.4.1 |
How do I fix CVE-2026-85061?
Upgrade maplibre-gl to 6.4.1 or later.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2026-85061 being exploited?
There is no known exploitation of CVE-2026-85061 in the wild and no public exploit code.
Sources
Also known as CLSA-2026-1789160133, ECHO-0a66-ea63-71bc, GHSA-jrc7-96c5-q579, MINI-6xfw-h7qv-j78h, MINI-8x25-29x8-wqhx, MINI-jvvw-jvpg-fr4c and 2 more.