Malicious Code Injection in foreign_takin_z3n: npm Package Vulnerability
Summary
MAL-2025-94570: Malicious code in foreign_takin_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 'foreign_takin_z3n' package is part of the npm ecosystem, which is widely used for JavaScript package management. This package has been identified as part of a malicious campaign that aims to exploit the npm registry by generating and publishing derivative packages with the intent to inflate developer reputation scores for token rewards. The package's functionality is compromised, making it a vector for malicious activities.
Vulnerability Detail
This vulnerability originates from the 'foreign_takin_z3n' package being associated with the tea.xyz token reward campaign. The malicious code embedded within this package modifies the package.json file to remove private flags, alters version numbers, and generates random package names. This results in the continuous republishing of variants, which pollutes the npm registry and can lead to reputational damage for developers and potential security risks for users who inadvertently install these malicious packages.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall foreign_takin_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 'foreign_takin_z3n' package altogether. If it is already installed, you can uninstall it with the following command: npm uninstall foreign_takin_z3n.
Conclusion
The 'foreign_takin_z3n' package poses a significant risk due to its malicious code that alters package metadata and repopulates the npm registry with harmful variants. It is crucial for developers to remove this package and monitor their dependencies for vulnerabilities to maintain application security.
See every vulnerability recorded for foreign_takin_z3n →
FAQ
The 'foreign_takin_z3n' package is an npm package that has been identified as part of a malicious campaign aimed at exploiting the npm registry.
This vulnerability can lead to the installation of malicious code that modifies your package.json file and can potentially compromise your application's integrity.
You should uninstall the 'foreign_takin_z3n' package immediately to prevent any malicious activities from affecting your application.
Currently, there is no patched version of the 'foreign_takin_z3n' package available. The best action is to remove it from your project.
You can use tools like Vulert, which monitors your package-lock.json file to alert you in real-time for open-source vulnerabilities in your software.