Malicious Code Injection in chafikcroissant Package: npm Vulnerability Overview
Summary
MAL-2025-171018: Malicious code in chafikcroissant (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 chafikcroissant package is part of the npm ecosystem, which is widely used for JavaScript package management. This package, like many others, is intended to facilitate the development and distribution of JavaScript applications. However, it has been identified as part of a malicious campaign that aims to manipulate the npm registry and inflate developer reputation scores through the automatic generation of derivative packages.
Vulnerability Detail
The vulnerability in the chafikcroissant package stems from its association with the tea.xyz token reward campaign. This package contains malicious code that modifies the package.json file to remove private flags, alters version numbers, and generates random package names, which leads to the continuous republishing of these variants. This behavior not only pollutes the npm registry but also poses a risk to developers who may unknowingly use these compromised packages, potentially leading to security breaches and loss of trust in the npm ecosystem.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall chafikcroissant
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 chafikcroissant package and look for alternative packages that provide similar functionality without the associated risks. Additionally, regularly monitor your dependencies for vulnerabilities using tools like Vulert, which can alert you to open-source vulnerabilities in real-time.
Conclusion
The chafikcroissant package poses a significant risk due to its malicious code that alters package metadata and floods the npm registry. It is essential for developers to be vigilant and remove any affected packages from their projects while utilizing tools like Vulert for ongoing monitoring.
See every vulnerability recorded for chafikcroissant →
FAQ
The chafikcroissant package is an npm package that has been identified as part of a malicious campaign aimed at manipulating the npm registry.
The vulnerability can lead to the introduction of malicious code into your project, potentially compromising security and integrity.
You should uninstall the package immediately and check your project for any other affected dependencies.
You can use tools like Vulert to monitor your project for open-source vulnerabilities in real-time without requiring access to the code.
Yes, you can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.