Critical Malicious Code Vulnerability in l2-contracts Package
Summary
MAL-2026-683: Malicious code in l2-contracts (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 l2-contracts package is a library used in the npm ecosystem, primarily for developing and deploying smart contracts on blockchain platforms. It provides developers with essential tools and functionalities for contract management. However, this package has been identified as containing malicious code, posing significant security risks to any system utilizing it.
Vulnerability Detail
The vulnerability originates from the l2-contracts package, which has been flagged for containing embedded malicious code. Any system that has this package installed is considered fully compromised, potentially allowing unauthorized access to sensitive information such as secrets and keys. The malicious nature of this code means that simply removing the package may not eliminate all traces of the malware, as full control of the affected computer may have been granted to an external entity.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall l2-contracts
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 direct workarounds to mitigate the risks posed by the l2-contracts package. The only recommended action is to uninstall the package and rotate any sensitive information that may have been compromised.
Conclusion
The l2-contracts package has been identified as containing malicious code, which poses serious security risks to any system using it. Immediate action is required to uninstall the package and secure any sensitive information. Utilizing tools like Vulert can help monitor for such vulnerabilities in the future.
See every vulnerability recorded for l2-contracts →
FAQ
Immediately uninstall the l2-contracts 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.
Keeping the l2-contracts package installed poses significant risks, including unauthorized access to sensitive data and potential control over your system by malicious actors.
After uninstalling the package, ensure that all secrets and keys are rotated from a secure computer. There is no guarantee that all malicious software will be removed by simply uninstalling the package.
Vulert monitors and alerts for open-source vulnerabilities in your software using just the package-lock.json file, providing real-time updates on potential threats.