GHSA-jrc7-96c5-q579

Suggest an improvement
Source
https://github.com/advisories/GHSA-jrc7-96c5-q579
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-jrc7-96c5-q579/GHSA-jrc7-96c5-q579.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-jrc7-96c5-q579
Aliases
Downstream
Published
2026-09-08T20:50:47Z
Modified
2026-09-08T21:00:06Z
Severity
  • 10.0 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N CVSS Calculator
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

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"
}
References

Affected packages

npm / maplibre-gl

Package

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
6.4.1

Database specific

last_known_affected_version_range
"<= 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"