Description
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.
Published: 2026-09-03
Score: 10 Critical
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

MapLibre GL JS contains a flaw in its DOM sanitizer routine that allows an attacker to supply malicious attributes such as onload or ontoggle directly in map attribution strings. When the library processes attributes as a live NamedNodeMap while simultaneously removing them, a consecutive dangerous attribute can slip through the loop and persist in the cleanup. If a vulnerable map is rendered, the surviving attribute is inserted into innerHTML and its code executes in the visitor’s browser, enabling arbitrary script execution.

Affected Systems

The vulnerability affects the open‑source MapLibre GL JS library before version 6.4.1. Systems that load a MapLibre GL JS build older than 6.4.1 and that accept untrusted third‑party style attribution strings or externally supplied custom attributions are at risk. Delivering map pages to browsers that render the affected map content provides the execution vector.

Risk and Exploitability

With a CVSS score of 10 the flaw is considered critical. The EPSS score is not available, but the risk is high because the bug is exploitable via ordinary web content. The CISA KEV listing is empty, indicating no known widespread exploitation yet, yet the flaw remains open for attackers who can insert malicious attribution data. The attack vector is the web page that renders the map; the attacker needs only to craft a malicious attribution entry, which is then processed by the affected library and executed in the victim’s browser.

Generated by OpenCVE AI on September 3, 2026 at 21:54 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade MapLibre GL JS to version 6.4.1 or later to apply the vendor‑supplied fix that corrects the attribute removal logic.
  • If an immediate upgrade is not possible, sanitize every user‑supplied or third‑party attribution string on the server or before it is passed to the library, removing any event‑handler attributes such as onload or ontoggle.
  • Ensure that any custom implementation of DOM.sanitize() or related rendering code operates on a static copy of attributes rather than a live NamedNodeMap, preventing index skipping during cleanup.

Generated by OpenCVE AI on September 3, 2026 at 21:54 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 03 Sep 2026 20:30:00 +0000

Type Values Removed Values Added
Description 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.
Title MapLibre GL JS: XSS Sanitizer Bypass in DOM.sanitize() via Live NamedNodeMap Removal Skip
Weaknesses CWE-79
References
Metrics cvssV3_1

{'score': 10, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-09-03T20:18:50.854Z

Reserved: 2026-09-02T21:21:01.774Z

Link: CVE-2026-85061

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-09-03T21:17:23.323

Modified: 2026-09-03T21:17:23.323

Link: CVE-2026-85061

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-03T22:00:13Z

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')