Vulnerability GHSA-jrc7-96c5-q579

Critical
CRITICAL RISK
CVSS Score: 10.0
Score Range: 9.0–10.0
Critical severity vulnerabilities (CVSS 9.0–10.0). These represent the highest impact issues.
2 months ago
September 08, 2026 at 08:50 PM UTC
MapLibre GL JS: XSS Sanitizer Bypass in DOM.sanitize() via Live NamedNodeMap Removal Skip
>=6.0.0 <6.4.1, <5.24.1
>=6.0.0 <6.4.1, <5.24.1

Summary

MapLibre GL JS: XSS Sanitizer Bypass in DOM.sanitize() via Live NamedNodeMap Removal Skip

Details

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

Impacted packages

Timeline

Published
2 months ago
September 08, 2026 at 08:50 PM UTC
Fixed (6.4.1)
3 months ago
August 18, 2026 at 01:38 PM UTC
Fixed (5.24.1)
20 days ago
November 11, 2026 at 01:44 PM UTC
Last Modified
20 hours ago
December 01, 2026 at 03:15 PM UTC