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

Published Sep 3, 2026
·
Updated

MapLibre GL JS is an interactive vector tile map library for web browsers. Prior to 6.4.1, DOM.sanitize() in src/util/dom.ts iterates elem.attributes as a live NamedNodeMap while removeAttributes() removes attributes from the same collection, shifting indexes and skipping an adjacent dangerous attribute. An attacker who controls untrusted third-party style attribution strings or user-supplied custom attributions can supply consecutive dangerous attributes, causing an attribute such as onload or ontoggle to survive sanitization and execute when the attribution control inserts the content into innerHTML. A victim must render the affected map content for the script to execute. This issue is fixed in version 6.4.1.

Affected Software

1 affected component
MapLibre MapLibre GL JS<6.4.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade MapLibre GL JS to a version that resolves this vulnerability.

    Fixed in 6.4.1

Event History

Sep 3, 2026
CVE Published
via MITRE·08:18 PM
Data Sourced
via MITRE·08:18 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which applications are realistically exposed to this issue?

Applications using MapLibre GL JS before 6.4.1 are exposed if they render untrusted third-party style attribution strings or user-supplied custom attributions. The issue is triggered when the attribution control inserts that content into innerHTML.

2

What does an attacker need to exploit the flaw?

An attacker must be able to supply attribution content containing consecutive dangerous attributes. The live attribute collection can shift during sanitization, allowing an adjacent event-handler attribute such as onload or ontoggle to remain.

3

Is victim interaction required for exploitation?

No explicit user interaction is required, but a victim must render the affected map content. Script execution occurs when the vulnerable attribution content is inserted into the page.

4

How can I remediate the issue?

Upgrade MapLibre GL JS to version 6.4.1, which fixes the sanitizer iteration issue. Until upgrading, do not allow untrusted third parties or users to provide custom attribution strings, and avoid rendering untrusted style attributions.

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