Critical Security Flaw in bcryptkit: Malicious Code Detected
Summary
MAL-2025-190512: Malicious code in bcryptkit (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
bcryptkit is an npm package designed for handling bcrypt hashing, commonly used for securely storing passwords. It provides developers with a simple interface to implement hashing and verification processes. However, the package has been compromised, leading to significant security risks for any applications utilizing it.
Vulnerability Detail
The vulnerability originates from the discovery of malicious code embedded within the bcryptkit package. This code can compromise any system where the package is installed, potentially allowing unauthorized access to sensitive information such as secrets and keys. The malicious nature of this code poses a severe risk, as it may lead to full control of the affected systems by external entities.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall bcryptkit
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 measure, if you must continue using bcryptkit, consider isolating the environment where it is used and restricting access to sensitive data. However, the best practice is to remove the package entirely.
Conclusion
The discovery of malicious code in the bcryptkit package poses a significant security threat to applications using it. Immediate action is required to remove the package and secure any sensitive information. Regular monitoring of dependencies is essential to maintain a secure software environment.
See every vulnerability recorded for bcryptkit →
FAQ
bcryptkit is an npm package used for hashing passwords securely using the bcrypt algorithm.
The malicious code was identified through security assessments conducted by Amazon Inspector and reported by the GitHub Security Advisory.
You should immediately uninstall the bcryptkit package and rotate any secrets or keys stored on the affected system.
While many npm packages are safe, it is crucial to regularly monitor and audit your dependencies for vulnerabilities using tools like Vulert.
Vulert monitors your package-lock.json file to alert you in real-time for any open-source vulnerabilities in your software, ensuring you stay informed about potential risks.