Critical Malicious Code Vulnerability in react-leaflet-heatmap-layer Package
Summary
MAL-2026-2072: Malicious code in react-leaflet-heatmap-layer (npm). Affects react-leaflet-heatmap-layer versions 2.0.1. 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 react-leaflet-heatmap-layer package is a popular npm library used for integrating heatmap layers into Leaflet maps, enhancing data visualization in web applications. It allows developers to create dynamic heatmaps based on geographical data points. However, this package has been compromised, introducing significant security risks to any application that utilizes it.
Vulnerability Detail
The vulnerability stems from the presence of malicious code embedded within the react-leaflet-heatmap-layer package. This code can fully compromise any computer where the package is installed, potentially allowing unauthorized access to sensitive information such as secrets and keys. The malicious nature of this code has been confirmed by security researchers, and it poses a severe threat to the integrity and security of affected systems.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall react-leaflet-heatmap-layer
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
As a temporary measure, consider isolating the application from the internet and monitoring for any suspicious activity. Additionally, rotate all secrets and keys stored on the affected system from a secure, unaffected computer.
Conclusion
The react-leaflet-heatmap-layer package has been identified as containing malicious code that poses a significant security risk. Immediate action is required to remove the package and secure any affected systems. Regular monitoring for vulnerabilities is essential to maintain application security.
See every vulnerability recorded for react-leaflet-heatmap-layer →
FAQ
It is an npm library that allows developers to add heatmap layers to Leaflet maps for enhanced data visualization.
If your application uses the compromised package, it may be at risk of unauthorized access and data breaches.
Immediately remove the package and rotate any sensitive information stored on the affected system.
Currently, it is recommended to remove the package entirely as the extent of the compromise is severe.
You can use Vulert, which monitors and alerts in real-time for open-source vulnerabilities using just package-lock.json. You can check your application for vulnerabilities using the Vulert playground without any signup.