Description
Versions 1.x prior to 1.6.6 and 2.x prior to 2.2.4 of mapbox.js are vulnerable to a cross-site-scripting attack in certain uncommon usage scenarios.
If L.mapbox.map or L.mapbox.shareControl are used in a manner that gives users control of the TileJSON content, it is possible to inject script content into the name value of the TileJSON.
Recommendation
Update the mapbox.js package to the latest compatible version. Followings are version details:
Affected version(s): **>= 2.0.0, < 2.2.4 < 1.6.6** Patched version(s): **2.2.4 1.6.6**
References
- GHSA-q69p-5h74-w36f
- hackerone.com
- www.npmjs.com
- nodesecurity.io
- CVE-2017-1000043
- CWE-79
- CAPEC-310
- OWASP 2021-A3
- OWASP 2021-A6
Related Issues
- Content Injection via TileJSON attribute in mapbox.js - CVE-2017-1000042
- Unhead has XSS bypass in `useHeadSafe` via attribute name injection and case-sensitive protocol check - CVE-2026-31860
- OpenZeppelin Contracts Wizard has Code Injection in Generated Hardhat and Foundry Tests via Unsanitized opts.name / opts - CVE-2026-48054
- Axios: Regular Expression Denial of Service (ReDoS) via Cookie Name Injection - CVE-2026-44496
You might also like:
- Tags:
- npm
- mapbox.js
Anything's wrong? Let us know Last updated on March 27, 2023


