Malicious Code Injection in basilamir Package: A Threat to npm Ecosystem
Summary
MAL-2025-170959: Malicious code in basilamir (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 basilamir package is part of the npm ecosystem, which is widely used for JavaScript package management. It is designed to facilitate various functionalities within JavaScript applications. However, it has been identified as part of a malicious campaign that aims to manipulate the npm registry by generating and publishing derivative packages with altered metadata. This vulnerability poses a significant risk to developers relying on this package for their projects.
Vulnerability Detail
The vulnerability in the basilamir package originates from its association with the tea.xyz token reward campaign. This campaign has led to the creation of numerous malicious packages that include scripts designed to autopublish variants with randomized names. The malicious payload modifies the package.json file by removing private flags and changing version numbers, which can lead to the pollution of the npm registry. This not only affects the integrity of the package but also can inflate developer reputation scores fraudulently, potentially leading to security risks for applications using these packages.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall basilamir
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, you can remove the basilamir package from your project by executing the following command: npm uninstall basilamir. This will prevent any malicious code from executing until a secure version is available.
Conclusion
The basilamir package has been identified as a vector for malicious code injection, posing significant risks to applications within the npm ecosystem. It is crucial for developers to stay informed about such vulnerabilities and take proactive measures to secure their projects.
See every vulnerability recorded for basilamir →
FAQ
The basilamir package is an npm package used in JavaScript applications, but it has been identified as part of a malicious campaign.
The vulnerability can lead to the injection of malicious code, altering your application's behavior and potentially compromising security.
You should uninstall the package immediately and check for updates or alternatives that do not pose security risks.
You can use tools like Vulert, which monitors your package-lock.json file for open-source vulnerabilities in real-time without requiring code access.
Yes, you can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.