GHSA-JRC7-96C5-Q579
Vulnerability from github – Published: 2026-09-08 20:50 – Updated: 2026-09-08 20:50Impact
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
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 6.4.0"
},
"package": {
"ecosystem": "npm",
"name": "maplibre-gl"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "6.4.1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-85061"
],
"database_specific": {
"cwe_ids": [
"CWE-79"
],
"github_reviewed": true,
"github_reviewed_at": "2026-09-08T20:50:47Z",
"nvd_published_at": "2026-09-03T21:17:23Z",
"severity": "CRITICAL"
},
"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 `\u003cdetails open onload=\"1\" ontoggle=\"...\"\u003e`). 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",
"id": "GHSA-jrc7-96c5-q579",
"modified": "2026-09-08T20:50:47Z",
"published": "2026-09-08T20:50:47Z",
"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"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N",
"type": "CVSS_V3"
}
],
"summary": "MapLibre GL JS: XSS Sanitizer Bypass in DOM.sanitize() via Live NamedNodeMap Removal Skip"
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.