Malicious Code Injection in recent_tern_z3n: A Threat to npm Packages
Summary
MAL-2025-96228: Malicious code in recent_tern_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 'recent_tern_z3n' is part of a larger ecosystem within npm, often used for various JavaScript applications. It is designed to facilitate the development and distribution of JavaScript modules. However, it has been compromised as part of a malicious campaign that aims to inflate developer reputation scores through the automatic generation and publication of derivative packages.
Vulnerability Detail
The vulnerability in 'recent_tern_z3n' stems from its association with the tea.xyz token reward campaign, which has led to the inclusion of malicious scripts. These scripts modify the package.json file to remove private flags, alter version numbers, and generate random package names, ultimately leading to the pollution of the npm registry. This not only affects the integrity of the npm ecosystem but also poses a risk to developers who may unknowingly install these compromised packages.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall recent_tern_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 'recent_tern_z3n' and look for alternative packages that provide similar functionality without the associated risks. Additionally, consider using tools like Vulert to monitor your package dependencies for vulnerabilities.
Conclusion
The 'recent_tern_z3n' package has been identified as containing malicious code that poses a significant risk to developers and the npm ecosystem. It is essential to take immediate action to remove this package and monitor your dependencies for any vulnerabilities. Utilizing tools like Vulert can help in maintaining the security of your projects.
See every vulnerability recorded for recent_tern_z3n →
FAQ
The malicious code modifies package.json files, removes private flags, and generates random package names to inflate developer reputation scores.
You can use Vulert to monitor your package-lock.json file for vulnerabilities without needing to install any software.
Using compromised packages can lead to security breaches, data loss, and the introduction of unwanted code into your applications.
Regularly audit your dependencies, use tools like Vulert for real-time monitoring, and stay updated on security advisories related to your packages.
Immediately uninstall the package using 'npm uninstall recent_tern_z3n' and check for any other dependencies that may be affected.