Malicious Code Injection in hydra-regulus-wavefunction-spectron: A Threat to npm Packages
Summary
MAL-2025-187404: Malicious code in hydra-regulus-wavefunction-spectron (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 'hydra-regulus-wavefunction-spectron' is part of the npm ecosystem, which is widely used for JavaScript package management. This package, like many others, is intended to facilitate the development of applications by providing reusable code. However, it has been identified as part of a malicious campaign that exploits npm's publishing capabilities, leading to potential security risks for developers and users alike.
Vulnerability Detail
The vulnerability in 'hydra-regulus-wavefunction-spectron' originates from its association with a malicious campaign designed to inflate developer reputation scores through the automatic generation and publication of derivative packages. This malicious code modifies the package.json file by removing private flags, altering version numbers, and creating random package names, which can lead to the pollution of the npm registry and compromise the integrity of the software supply chain.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall hydra-regulus-wavefunction-spectron
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 'hydra-regulus-wavefunction-spectron' package altogether and look for alternative packages that provide similar functionality without the associated risks.
Conclusion
The 'hydra-regulus-wavefunction-spectron' package poses a significant risk due to its malicious code that alters package metadata and publishes harmful derivatives. It is essential for developers to remove this package from their projects and remain vigilant about the security of their dependencies.
See every vulnerability recorded for hydra-regulus-wavefunction-spectron →
FAQ
The main issue is that it contains malicious code that modifies package.json files and publishes derivative packages, which can compromise the integrity of the npm registry.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Visit Vulert Scanner to check if your application is affected without needing to sign up.
You should uninstall the package immediately using 'npm uninstall hydra-regulus-wavefunction-spectron' and look for alternatives.
While specific alternatives depend on your use case, consider searching the npm registry for similar packages that do not have known vulnerabilities.
Regularly check for updates in your packages and consider using tools like Vulert to monitor vulnerabilities in your software.