Malicious Code Injection in lexical_egret_z3n: A Threat to npm Ecosystem
Summary
MAL-2025-95241: Malicious code in lexical_egret_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 'lexical_egret_z3n' is part of the npm ecosystem, which is widely used for JavaScript package management. This package is associated with the tea.xyz token reward campaign, which has been linked to a series of malicious packages that flood the npm registry. These packages are designed to manipulate developer reputation scores by automatically generating and publishing derivative packages with randomized names.
Vulnerability Detail
The vulnerability in 'lexical_egret_z3n' originates from its malicious code that modifies the package.json file. It removes private flags, alters version numbers, and generates random package names, leading to the pollution of the npm registry. This behavior not only compromises the integrity of the npm ecosystem but also poses risks to developers who may unknowingly use these compromised packages, potentially leading to security breaches and loss of trust in the package management system.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall lexical_egret_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 'lexical_egret_z3n' package and consider using alternative packages that provide similar functionality without the associated risks. Additionally, regularly audit your npm packages using tools like npm audit to identify and address vulnerabilities.
Conclusion
The 'lexical_egret_z3n' package poses a significant threat due to its malicious code that compromises the npm ecosystem. It is crucial for developers to be vigilant, regularly audit their dependencies, and utilize tools like Vulert to safeguard their applications from such vulnerabilities.
See every vulnerability recorded for lexical_egret_z3n →
FAQ
The main issue is that it contains malicious code that modifies package.json files and floods the npm registry with derivative packages.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Check your application using the Vulert playground at Vulert Scanner without any signup.
You should uninstall the package immediately using 'npm uninstall lexical_egret_z3n' and look for alternative packages.
Yes, consider exploring other npm packages that offer similar functionalities without the associated risks. Always review the package's reputation and security history.
Vulert uses the package-lock.json file to monitor and alert in real-time for open-source vulnerabilities, ensuring your application remains secure.