CVE-2026-85061: MapLibre GL JS Cross-Site Scripting Vulnerability
CRITICALCVE-2026-85061 is a CRITICAL (CVSS 10.0) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting MapLibre GL JS libraries in the npm ecosystem. The issue involves xss sanitizer bypass in dom.sanitize() via live namednodemap removal skip. Remediation is available by upgrading affected packages to version 6.4.1.
CVE-2026-85061 at a Glance
Security Impact
CVSS: 10.0
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N).
How to Fix CVE-2026-85061
To remediate this vulnerability, upgrade all affected MapLibre GL JS dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install maplibre-gl@6.4.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls maplibre-gl
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-85061, inspect your project dependencies using npm:
npm ls maplibre-gl
Analyze the terminal output to locate any version of MapLibre GL JS in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.4.1), your application is affected.
Note: The npm ls maplibre-gl command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In MapLibre GL JS, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-85061 Affected MapLibre GL JS Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
maplibre-gl
|
npm |
< 6.4.1
|
6.4.1
|
References
Frequently Asked Questions
What is CVE-2026-85061?
Which MapLibre GL JS versions are affected?
What version fixes CVE-2026-85061?
Is maplibre-gl affected?
What is the CVSS score of CVE-2026-85061?
What CWE is associated with CVE-2026-85061?
How can I check npm dependencies for CVE-2026-85061?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-jrc7-96c5-q579",
"modified" : "2026-09-08T20:50:47Z",
"published" : "2026-09-08T20:50:47Z",
"aliases" : [ "CVE-2026-85061" ],
"summary" : "MapLibre GL JS: XSS Sanitizer Bypass in DOM.sanitize() via Live NamedNodeMap Removal Skip",
"details" : "### Impact\n`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.\n\nAn 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).\n\nApplications rendering untrusted/third-party style attribution strings or user-supplied custom attributions are impacted.\n\n### Patches\nThe 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).\n\n### Workarounds\nSanitizing the attribute field of a source before passing it down to maplibre",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "maplibre-gl"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "6.4.1"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 6.4.0"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/maplibre/maplibre-gl-js/security/advisories/GHSA-jrc7-96c5-q579"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-85061"
}, {
"type" : "WEB",
"url" : "https://github.com/maplibre/maplibre-gl-js/pull/8189"
}, {
"type" : "WEB",
"url" : "https://github.com/maplibre/maplibre-gl-js/commit/1da69f3cd913a39fa948708e01478663bf48bc27"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/maplibre/maplibre-gl-js"
}, {
"type" : "WEB",
"url" : "https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.4.1"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2026-09-08T20:50:47Z",
"nvd_published_at" : "2026-09-03T21:17:23Z"
}
}