Malicious Code Injection in chafikbaguette Package: A Threat to npm Users
Summary
MAL-2025-171016: Malicious code in chafikbaguette (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 chafikbaguette package is part of the npm ecosystem, primarily used for JavaScript development. It is often leveraged in various applications for its functionalities. However, this package has been identified as part of a malicious campaign that aims to inflate developer reputation scores through automated scripts. The presence of malicious code poses significant risks to developers and users alike, as it can lead to unauthorized modifications and pollution of the npm registry.
Vulnerability Detail
The vulnerability in the chafikbaguette package originates from its association with the tea.xyz token reward campaign. This campaign has led to the creation of numerous derivative packages that contain autopublish scripts designed to manipulate package.json files. The malicious payload removes private flags, alters version numbers, and generates random package names, which can lead to the proliferation of harmful packages in the npm registry. This not only affects the integrity of the npm ecosystem but also poses security risks to applications that depend on these packages.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall chafikbaguette
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 avoid using the chafikbaguette package and look for alternative packages that provide similar functionalities without the associated risks. Additionally, you can monitor your project for any unauthorized changes to package.json files.
Conclusion
The chafikbaguette package poses a significant security threat due to its malicious code designed to manipulate npm packages. It is essential for developers to remove this package and monitor their applications for any unauthorized changes. Utilizing tools like Vulert can help maintain the security of your projects.
See every vulnerability recorded for chafikbaguette →
FAQ
The chafikbaguette package is an npm package used in JavaScript development, but it has been identified as part of a malicious campaign.
The vulnerability can lead to unauthorized modifications in your package.json file, potentially compromising your application's integrity and security.
You should uninstall the chafikbaguette package immediately and check for any dependencies that may rely on it.
Yes, you can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time using just your package-lock.json file. You can check your application for vulnerabilities using the Vulert playground without any signup.
Regularly audit your npm packages using commands like npm audit, keep your dependencies updated, and use tools like Vulert to monitor for vulnerabilities.