Live threats

All CVEs / maplibre

CVE-2026-85061maplibre-gl-js

Incomplete HTML attribute sanitization in MapLibre GL JS

Critical 10.0 No auth needed

Priority
75
CVSS 3.1
10.0
EPSS
—
Auth required
No
Published
Sep 3, 2026
Updated
Sep 9, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-79
SSVC (CISA)
Exploitation: none · Automatable: yes · Technical impact: total
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N

What happens

MapLibre GL JS prior to version 6.4.1 contains a flaw in the DOM.sanitize() function that allows dangerous attributes such as onload or ontoggle to bypass sanitization when provided consecutively in attribution strings. An attacker controlling third-party or custom attributions can execute arbitrary JavaScript code when a victim renders the map.

Show the original NVD text

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.

Source text, unmodified. NVD.

What to do

Patch available · fixed versions: 6.4.1, 5.24.1

Update maplibre-gl to version 6.4.1 or 5.24.1 depending on your supported branch.

Vendor advisory · github.com ↗

  1. Apply the vendor's security update for maplibre-gl-js.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
npm maplibre-gl ≥ 6.0.0 < 6.4.1 6.4.1 npm install maplibre-gl@6.4.1
npm maplibre-gl < 5.24.1 5.24.1 npm install maplibre-gl@5.24.1

Per OSV / GitHub Advisories (GHSA-jrc7-96c5-q579). Check the version in your lockfile before upgrading.

Affected products

As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.

Official sources

References

Links published by the sources. Open them with care.