CVE-2026-85061 — MapLibre GL JS: XSS Sanitizer Bypass in maplibre-gl
MapLibre GL JS: XSS Sanitizer Bypass in DOM.sanitize() via Live NamedNodeMap Removal Skip
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.52%). Schedule for your next planned update.
Does your project use an affected maplibre-gl version?
Paste your package-lock.json to check it for CVE-2026-85061 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
Impact
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 requiring user interaction (zero-click XSS).
Applications rendering untrusted/third-party style attribution strings or user-supplied custom attributions are impacted.
Patches
The issue has been resolved by creating a static snapshot of attributes using Array.from(elem.attributes) before iteration. Please upgrade to maplibre-gl version 6.4.1 (or latest).
Workarounds
Sanitizing the attribute field of a source before passing it down to maplibre
Advisory Timeline
- First published September 8, 2026 (79 days ago).
- Last revised September 8, 2026 — 0 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
npm install maplibre-gl@6.4.1
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: npm (1).
| Package | Fixed In |
|---|---|
| maplibre-gl npm · Affected: All versions | 6.4.1 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-79Cross-site Scripting (XSS)MITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 10.0 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N
References
- https://github.com/maplibre/maplibre-gl-js/security/advisories/GHSA-jrc7-96c5-q579WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-85061ADVISORY
- https://github.com/maplibre/maplibre-gl-js/pull/8189WEB
- https://github.com/maplibre/maplibre-gl-js/commit/1da69f3cd913a39fa948708e01478663bf48bc27WEB
- https://github.com/maplibre/maplibre-gl-jsPACKAGE
- https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.4.1WEB
Frequently Asked Questions
- What is CVE-2026-85061?
- MapLibre GL JS: XSS Sanitizer Bypass in DOM.sanitize() via Live NamedNodeMap Removal Skip. This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 10.0/10).
- How do I check if my project is affected by CVE-2026-85061?
- CVE-2026-85061 affects maplibre-gl. It has a 0.5% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-85061 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Maximum impact if exploited, often with little effort or access required.
This is a below-median EPSS score — only 37.7% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2026-76807CRITICAL
Todoist MCP Server: Browser DNS rebinding lets websites write and delete Todoist data through local MCP server
- CVE-2026-114516CRITICAL
Etherpad: Pre-auth arbitrary file read