A critical cross-site scripting vulnerability in the widely used MapLibre GL JS library could expose applications and an estimated 2.7 million users to zero-click attacks.
The flaw, tracked as CVE-2026-85061 and GitHub Security Advisory GHSA-jrc7-96c5-q579, affects maplibre-gl versions 6.4.0 and earlier.
MapLibre GL JS is an open-source JavaScript mapping library used by websites and web applications to render interactive maps. The vulnerability exists in the library’s DOM.sanitize() function, which is intended to remove unsafe HTML attributes before inserting content into a page.
Researchers found that the sanitizer processed an element’s attributes through a live browser NamedNodeMap object. While the function iterated through the attributes, it also removed dangerous ones using elem.removeAttribute().
MapLibre Zero-Click Vulnerability
This created an index-shifting condition: once an attribute was removed, the next attribute moved into its position, but the loop advanced to the following index. As a result, the sanitizer could skip a malicious attribute placed directly after another unsafe attribute.
An attacker could exploit the issue by supplying HTML containing consecutive dangerous attributes. GitHub’s advisory provided an example involving a details element with attributes such as open, onload, and ontoggle.
The sanitizer may remove one malicious attribute but fail to inspect or remove the adjacent event handler. When MapLibre later inserts the surviving payload into innerHTML through its attribution control, the event handler can execute automatically.
The attack requires no user interaction, authentication, or special privileges. This makes it particularly serious for services that load map styles, attribution text, or other mapping data from third-party sources.
Applications that let users provide custom attributions may also be vulnerable if they pass those values to MapLibre without independent validation and sanitization.
Successful exploitation could allow attackers to execute JavaScript in the security context of a victim’s browser. Depending on the affected application, this could enable account-session theft, unauthorized actions, sensitive-data access, redirection to phishing pages, or manipulation of visible map content.
The issue received a critical severity rating under CVSS v3.1. Its vector is CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N, reflecting network-based exploitation, low complexity, no required privileges, and zero user interaction.
The advisory classifies the weakness as CWE-79, improper neutralization of input during web page generation, commonly known as cross-site scripting.
MapLibre maintainers fixed the flaw in maplibre-gl version 6.4.1. The patch changes the sanitizer’s behavior by first creating a static copy of element attributes with Array. from (elem. attributes). from(elem.attributes). The code can then safely inspect and remove attributes without changing the collection it’s currently iterating.
Organizations using MapLibre GL JS should immediately upgrade to version 6.4.1 or the latest available release. Security teams should also identify applications that process untrusted map style metadata, third-party attribution strings, or user-controlled custom attribution fields.
As a temporary mitigation, developers should sanitize attribution-related input before supplying it to MapLibre. However, upgrading remains the most reliable remediation because the vulnerable logic is part of the library’s internal DOM sanitization process.
Learn 7 Metric-Gated AI SOC Deployment Phases – Download Free AI SOC Deployment Playbook 2026.
The post MapLibre Vulnerability Exposes 2.7M Users to Zero-Click Attacks appeared first on Cyber Security News.
