# 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.

- **Severity:** Critical 10.0 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 3 Sep 2026
- **Updated:** 4 Sep 2026
- **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, MINI-rc8h-9hrw-57cr, MINI-wrgf-wpq9-v9pv

## 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 (Improper Neutralization of Input During Web Page Generation)

## Which versions are affected by CVE-2026-85061?

2 open source packages ship an affected version, including maplibre-gl.


| Package | Ecosystem | 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.

## Is CVE-2026-85061 being exploited?

There is no known exploitation of CVE-2026-85061 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-85061 and fix it if it is affected.

What it is: 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.
Exploitation: There is no known exploitation of CVE-2026-85061 in the wild and no public exploit code.

Affected packages and fixed versions:
- maplibre-gl (npm): affected all versions; fixed in 6.4.1
- maplibre-gl (npm): affected all versions; fixed in 6.4.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-85061/ (Markdown: https://insights.sbomify.com/CVE-2026-85061/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-85061
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-85061
- OSV: https://osv.dev/vulnerability/CVE-2026-85061

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-85061/
Summaries are generated and may contain mistakes; the official description above is the record.
