Critical Malicious Code Vulnerability in hackpreinstall Package
Summary
MAL-2026-1149: Malicious code in hackpreinstall (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 hackpreinstall package is an npm module designed to facilitate pre-installation scripts for various applications. It is commonly used in JavaScript projects to automate setup tasks before the main installation process. However, this package has been identified as containing malicious code that compromises the security of any system it is installed on.
Vulnerability Detail
The vulnerability stems from the presence of embedded malicious code within the hackpreinstall package. This code can fully compromise any computer that has the package installed, allowing unauthorized access to sensitive information such as secrets and keys. The malicious nature of this code poses significant risks, including data theft and system control by external entities. Users are advised to treat any system running this package as compromised, as simply removing the package may not eliminate all traces of the malicious software.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall hackpreinstall
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
There are no effective workarounds for this vulnerability other than removing the package and securing your system. Users should ensure that they do not run any applications that depend on hackpreinstall until the package is removed and the system is secured.
Conclusion
The hackpreinstall package poses a significant security risk due to the embedded malicious code it contains. Immediate action is required to uninstall the package and secure any compromised systems. Users are encouraged to utilize tools like Vulert for ongoing monitoring of their dependencies to prevent future vulnerabilities.
See every vulnerability recorded for hackpreinstall →
FAQ
You should immediately uninstall the hackpreinstall package and rotate any sensitive information stored on your system.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
Leaving hackpreinstall installed can lead to unauthorized access to your system, data theft, and potential control by malicious actors.
No, there is currently no patch available for hackpreinstall. The only solution is to uninstall the package.
Regularly monitor your dependencies using tools like Vulert to stay informed about vulnerabilities in your open-source packages.