Malicious Code Injection in lexical_cougar_z3n: A Threat to npm Packages
Summary
MAL-2025-95240: Malicious code in lexical_cougar_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_cougar_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 through the automatic generation and publishing of derivative packages. The malicious nature of this package lies in its ability to modify critical files and republish variants, thereby polluting the npm registry.
Vulnerability Detail
The vulnerability in 'lexical_cougar_z3n' originates from its association with the tea.xyz token reward campaign, which has led to the creation of numerous malicious packages. These packages contain scripts that automatically modify the package.json file to remove private flags, alter version numbers, and generate random package names. This behavior not only compromises the integrity of the npm registry but also poses risks to developers who may unknowingly use these packages, potentially leading to reputation damage and security breaches.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall lexical_cougar_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 'lexical_cougar_z3n' and any packages that may have been published as derivatives. Regularly audit your dependencies using tools like npm audit to identify and mitigate risks from malicious packages.
Conclusion
The 'lexical_cougar_z3n' package poses a significant threat due to its malicious code designed to manipulate npm registry entries. It is crucial for developers to remain vigilant, regularly audit their dependencies, and utilize tools like Vulert to ensure their projects remain secure.
See every vulnerability recorded for lexical_cougar_z3n →
FAQ
'lexical_cougar_z3n' is an npm package that has been identified as malicious, part of a campaign to inflate developer reputation scores through the automatic generation of derivative packages.
Using 'lexical_cougar_z3n' can compromise your project's integrity, lead to security breaches, and damage your developer reputation due to the malicious behavior of the package.
You should uninstall 'lexical_cougar_z3n' immediately using 'npm uninstall lexical_cougar_z3n' and check for any other affected packages in your project.
You can use tools like Vulert, which monitors and alerts for open-source vulnerabilities in real-time using just your package-lock.json file. You can also check your application against known vulnerabilities using the Vulert playground.
Yes, tools like npm audit and Vulert can help identify and alert you to malicious packages and vulnerabilities in your dependencies.