Malicious Code Injection in Solidity-Lock Package
Summary
MAL-2026-17302: Malicious code in solidity-lock (npm). Affects solidity-lock versions 2.21.0. 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
Solidity-Lock is an npm package designed for managing and securing smart contracts in the Ethereum blockchain ecosystem. It is intended to provide developers with tools for logging and monitoring, but recent findings have revealed that the package contains malicious code that could compromise the security of applications using it. The package has a misleading identity, with its README and keywords suggesting legitimate functionality while concealing harmful behavior.
Vulnerability Detail
The vulnerability originates from an obfuscated bundle included in the package, which executes malicious code upon import. This code runs with full host privileges, allowing potential attackers to exploit the system. The package's declared main file is a no-op Express middleware that only serves to load the obfuscated code, which is designed to perform unauthorized actions, including making outbound HTTP requests. The presence of this malicious code poses a significant risk to any application that requires this package, as it can lead to data breaches and unauthorized access.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall solidity-lock
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, consider removing the Solidity-Lock package from your project until a secure version is released. You can do this by running the command: 'npm uninstall solidity-lock'. Additionally, monitor your application for any signs of unauthorized access or data breaches.
Conclusion
The Solidity-Lock package has been identified as containing malicious code that poses a significant risk to applications using it. It is crucial to take immediate action by updating or removing the package to safeguard your application from potential threats. Regular monitoring and using tools like Vulert can help maintain the security of your software.
See every vulnerability recorded for solidity-lock →
FAQ
Solidity-Lock is an npm package used for managing and securing smart contracts in the Ethereum ecosystem.
The malicious code executes with full host privileges, potentially leading to unauthorized access and data breaches.
You can use Vulert's playground at Vulert Scanner to check if your application is affected without requiring any signup.
If an immediate update is not possible, consider removing the package and monitoring your application for any suspicious activity.
Detailed information about this vulnerability can be found in the vulnerability report and on security advisory platforms.