Malicious Code Detected in mapbox-gl-js-toys Package - Security Risk Alert
Summary
MAL-2025-6844: Malicious code in mapbox-gl-js-toys (npm). Affects mapbox-gl-js-toys versions >= 5.0.0. No fix is published. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The mapbox-gl-js-toys package is an npm library designed for creating interactive maps using Mapbox GL JS. It provides various tools and utilities to enhance the mapping experience. However, this package has been identified to communicate with a domain associated with malicious activity, posing a significant security risk to users and their applications.
Vulnerability Detail
The vulnerability in the mapbox-gl-js-toys package originates from its communication with a domain linked to malicious activities. This could lead to unauthorized data access, potential data breaches, or exploitation of the application using this package. The issue was introduced in version 5.0.0 and remains a concern for any application utilizing this library.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall mapbox-gl-js-toys
If it arrived as a transitive dependency, remove the package that pulled it in, then reinstall.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
If an immediate update is not possible, consider removing the mapbox-gl-js-toys package from your project until a secure version is released. You can do this by executing: npm uninstall mapbox-gl-js-toys.
Conclusion
The mapbox-gl-js-toys package has been flagged for a serious vulnerability due to its communication with a malicious domain. Users are advised to update or remove the package to safeguard their applications. Utilizing tools like Vulert can help monitor and manage vulnerabilities effectively.
See every vulnerability recorded for mapbox-gl-js-toys →
FAQ
It is an npm library for creating interactive maps using Mapbox GL JS, providing various tools to enhance mapping functionalities.
The vulnerability involves the package communicating with a domain associated with malicious activities, which could compromise application security.
You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
Consider removing the package from your project until a secure version is available to prevent potential security risks.
Vulert uses the package-lock.json file to monitor and alert in real-time for open-source vulnerabilities in your software, ensuring you stay informed about potential risks.