Malicious Code Detected in distogram: A Critical npm Vulnerability
Summary
MAL-2025-18503: Malicious code in distogram (npm). Affected versions are not published. 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 package 'distogram' is an npm library designed for statistical distribution analysis and visualization. It provides developers with tools to create and manipulate distribution graphs easily. However, recent findings have revealed that this package contains malicious code, posing significant risks to applications that utilize it.
Vulnerability Detail
The vulnerability in 'distogram' originates from the inclusion of malicious code within the package itself. This code can potentially compromise the security of applications that depend on 'distogram', leading to unauthorized access, data breaches, or other malicious activities. The issue was introduced in version 0 and affects all subsequent versions, making it imperative for users to take immediate action.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall distogram
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 workaround, consider removing the 'distogram' package from your project until a secure version is released. You can do this by executing: 'npm uninstall distogram'. This will prevent any potential exploitation of the malicious code present in the package.
Conclusion
The discovery of malicious code in the 'distogram' npm package poses a serious threat to developers and their applications. Immediate action is required to mitigate risks, including uninstalling the package and monitoring for updates. Utilizing tools like Vulert can help keep your applications secure from such vulnerabilities.
See every vulnerability recorded for distogram →
FAQ
The malicious code is designed to exploit vulnerabilities in applications that use the package, potentially leading to unauthorized access or data breaches.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. Simply upload your package-lock.json file to the Vulert playground at Vulert Scanner to check for vulnerabilities.
Currently, there is no patched version available. Users are advised to uninstall the package until a secure version is released.
Immediately uninstall the package using 'npm uninstall distogram' and monitor for updates regarding a secure version.
It is highly discouraged to use distogram until the vulnerability is resolved, as the risks outweigh any potential benefits.