Malicious Code Injection in bayc Package: npm Vulnerability Overview
Summary
MAL-2025-99817: Malicious code in bayc (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 bayc package is part of the npm ecosystem, primarily used for various functionalities in JavaScript applications. It is often leveraged by developers for its utility in managing dependencies and enhancing application performance. However, this package has been identified as part of a malicious campaign that floods the npm registry with derivative packages, posing significant risks to developers and their projects.
Vulnerability Detail
The vulnerability in the bayc package stems from its association with the tea.xyz token reward campaign, which has been known to deploy malicious scripts. These scripts, such as auto.js and autopublish.js, are designed to manipulate the package.json file by removing private flags, altering version numbers, and generating random package names. This behavior leads to the continuous republishing of variants, ultimately polluting the npm registry and potentially compromising the integrity of applications relying on this package.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall bayc
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 bayc package from your project and replace it with an alternative package that offers similar functionality without the associated risks. You can do this by executing the following command: 'npm uninstall bayc'.
Conclusion
The bayc package has been identified as vulnerable due to its association with malicious scripts that compromise the npm registry. Developers are advised to update or remove the package to safeguard their applications. Utilizing tools like Vulert can help in monitoring and managing open-source vulnerabilities effectively.
See every vulnerability recorded for bayc →
FAQ
The bayc package is an npm package used in JavaScript applications for various functionalities, but it has been compromised by malicious code.
The vulnerability can lead to the injection of malicious code, which may compromise your application's integrity and security.
You should immediately update the bayc package to the latest version or remove it from your project to avoid potential risks.
You can use tools like Vulert, which monitors your package-lock.json file to alert you in real-time for open-source vulnerabilities.
Yes, you can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.