{"id":"GHSA-jrc7-96c5-q579","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 `\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","aliases":["CVE-2026-85061"],"modified":"2026-09-08T21:00:06.120859507Z","published":"2026-09-08T20:50:47Z","database_specific":{"github_reviewed":true,"github_reviewed_at":"2026-09-08T20:50:47Z","nvd_published_at":"2026-09-03T21:17:23Z","cwe_ids":["CWE-79"],"severity":"CRITICAL"},"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"}],"affected":[{"package":{"name":"maplibre-gl","ecosystem":"npm","purl":"pkg:npm/maplibre-gl"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"6.4.1"}]}],"database_specific":{"last_known_affected_version_range":"\u003c= 6.4.0","source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-jrc7-96c5-q579/GHSA-jrc7-96c5-q579.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N"}]}