Malicious Code Injection in valid_herring_z3n: A Threat to npm Ecosystem
Summary
MAL-2025-97220: Malicious code in valid_herring_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 'valid_herring_z3n' is part of the npm ecosystem, which is widely used for JavaScript package management. It is designed to facilitate the sharing and reuse of code among developers. However, this package has been identified as part of a malicious campaign that aims to exploit the npm registry by generating and publishing numerous derivative packages with random names, ultimately harming the integrity of the ecosystem.
Vulnerability Detail
The vulnerability in 'valid_herring_z3n' stems from its association with a malicious campaign that modifies the package.json file to remove private flags, alters version numbers, and generates random package names. This behavior is intended to inflate developer reputation scores for token rewards, leading to pollution of the npm registry. The malicious payload can potentially allow unauthorized access to sensitive data and disrupt the normal functioning of applications relying on this package.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall valid_herring_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 remove the 'valid_herring_z3n' package from your project by executing the command: 'npm uninstall valid_herring_z3n'. This will prevent any malicious code from executing while you seek a secure alternative.
Conclusion
The 'valid_herring_z3n' package poses a significant threat due to its malicious code that alters package configurations and pollutes the npm registry. It is crucial for developers to take immediate action by updating or removing this package to safeguard their applications.
See every vulnerability recorded for valid_herring_z3n →
FAQ
The malicious code modifies package.json to remove private flags and generates random package names, which can lead to the pollution of the npm registry.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Visit Vulert Scanner to check your application without any signup.
Using this package can expose your application to unauthorized access and compromise its integrity due to the malicious modifications it performs.
Regularly audit your dependencies and use tools like Vulert to monitor for vulnerabilities in your packages.
If an immediate update is not possible, consider removing the package from your project as a temporary measure until a secure version is available.