Malicious Code Injection in dynamic_rat_z3n: A Threat to npm Packages
Summary
MAL-2025-94152: Malicious code in dynamic_rat_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 dynamic_rat_z3n is part of a series of npm packages that emerged during the tea.xyz token reward campaign. These packages are designed to inflate developer reputation scores by automatically generating and publishing derivative packages with randomized names. This behavior not only clutters the npm registry but also poses significant security risks to developers and users relying on these packages.
Vulnerability Detail
The vulnerability in dynamic_rat_z3n originates from its malicious payload, which modifies the package.json file to remove private flags, alters version numbers, and generates random package names. This behavior allows the package to continuously republish variants, polluting the npm registry and potentially leading to the installation of compromised packages by unsuspecting developers. The malicious scripts (auto.js, autopublish.js, etc.) are designed to automate this process, making it difficult for users to identify and mitigate the threat.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall dynamic_rat_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, avoid using the dynamic_rat_z3n package and monitor your package-lock.json for any unauthorized changes. You can also utilize tools like Vulert to keep track of vulnerabilities in your dependencies. To check if your application is affected by this vulnerability, visit the Vulert playground at https://vulert.com/scanner without any signup.
Conclusion
The dynamic_rat_z3n package poses a significant security threat due to its malicious behavior of modifying package files and republishing variants. It is essential for developers to remove this package from their projects and monitor their dependencies for vulnerabilities. Utilizing tools like Vulert can aid in maintaining the security of your applications.
See every vulnerability recorded for dynamic_rat_z3n →
FAQ
dynamic_rat_z3n is an npm package that is part of a malicious campaign aimed at inflating developer reputation scores through automated publishing of derivative packages.
The vulnerability can lead to the installation of compromised packages, which may introduce security risks and instability to your project.
You should uninstall the package immediately using the command 'npm uninstall dynamic_rat_z3n' and check for any unauthorized changes in your project.
You can use tools like Vulert, which monitors your package-lock.json for vulnerabilities in real-time without requiring code access or installation.
Yes, you can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without signing up.