Malicious Code Injection in rough_slug_z3n: A Threat to npm Packages
Summary
MAL-2025-90234: Malicious code in rough_slug_z3n (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 rough_slug_z3n is part of a series of npm packages that have been associated with the tea.xyz token reward campaign. These packages are designed to manipulate npm's publishing system, often flooding the registry with derivative packages that have randomized names. This behavior not only affects the integrity of the npm ecosystem but also poses a risk to developers who may unknowingly use these compromised packages.
Vulnerability Detail
The vulnerability in rough_slug_z3n stems from its malicious code, which modifies the package.json file to remove private flags and alters version numbers. It generates random package names, primarily themed around Indonesian culture, and continuously republishes these variants, polluting the npm registry. This can lead to developers inadvertently using compromised packages, which may contain further vulnerabilities or malicious payloads.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall rough_slug_z3n
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 rough_slug_z3n package and any packages that depend on it. Additionally, consider using tools like Vulert to monitor your project for vulnerabilities. You can check if your application is affected by this vulnerability using the Vulert playground at https://vulert.com/scanner without any signup.
Conclusion
The rough_slug_z3n package poses a significant risk due to its malicious code designed to manipulate the npm registry. It is crucial for developers to remove this package from their projects and utilize tools like Vulert to monitor for vulnerabilities. Staying informed and proactive can help maintain the integrity of your software.
See every vulnerability recorded for rough_slug_z3n →
FAQ
rough_slug_z3n is an npm package that has been identified as containing malicious code aimed at manipulating the npm registry.
If your project uses rough_slug_z3n, it may be at risk of incorporating malicious code that can compromise your application's security and integrity.
You should uninstall the package immediately using the command npm uninstall rough_slug_z3n to mitigate any potential risks.
Yes, you can use Vulert, which monitors and alerts for open-source vulnerabilities in your software using just package-lock.json.
Regularly audit your dependencies and use tools like Vulert to monitor for vulnerabilities in real-time.