GHSA-jrc7-96c5-q579: XSS

Published Sep 8, 2026
·
Updated

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

Affected Software

1 affected componentFixes available
npm/maplibre-gl<=6.4.0
6.4.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/maplibre-gl to a version that resolves this vulnerability.

    Fixed in 6.4.1
  2. Upgrade

    Upgrade maplibre-gl to a version that resolves this vulnerability.

    Fixed in 6.4.1
  3. Configuration

    In DOM.sanitize() (src/util/dom.ts), change the loop to iterate over a static snapshot created with Array.from(elem.attributes), instead of iterating directly over the live NamedNodeMap while removing attributes. This prevents skipping/incorrect handling of consecutive attributes (e.g., dangerous ones) during sanitization.

    maplibre-gl (DOM.sanitize in src/util/dom.ts) attribute iteration method = Use Array.from(elem.attributes) to create a static snapshot before calling elem.removeAttribute()

Event History

Sep 8, 2026
Advisory Published
via GitHub·08:50 PM
Data Sourced
via GitHub·08:50 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Which deployments are exposed to exploitation?

Applications using maplibre-gl that render untrusted or third-party style attribution strings, or user-supplied custom attributions, are impacted. The vulnerable attribution content is inserted into innerHTML.

2

What does an attacker need to exploit this issue?

An attacker needs to supply a crafted HTML attribution payload containing consecutive dangerous attributes. No authentication or user interaction is required for the described zero-click XSS path.

3

What should be done if an immediate upgrade is not possible?

Sanitize the attribute field of a source before passing it to maplibre. This reduces exposure from untrusted attribution content until the package can be upgraded.

4

What version remediates the issue?

Upgrade maplibre-gl to version 6.4.1 or later. The fix snapshots the element attributes before removing unsafe ones, preventing adjacent attributes from being skipped.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203