Critical Malicious Code Vulnerability in express-enhanced Package
Summary
MAL-2026-17489: Malicious code in express-enhanced (npm). Affects express-enhanced versions 5.2.2. 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 express-enhanced package is an npm module that is designed to enhance the functionality of the popular Express web framework. It is intended for developers looking to extend Express with additional features. However, this package has been found to impersonate the official Express package, including using the same README and author information, which raises significant concerns about its integrity and security.
Vulnerability Detail
The vulnerability stems from the express-enhanced package version 5.2.2, which contains malicious code that executes during the installation process. The package's preinstall script downloads a JavaScript payload from an untrusted source (gitflic.ru) and executes it without any integrity checks. This allows an attacker to run arbitrary code on any machine that installs the package, posing a severe risk to users and their systems.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall express-enhanced
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 express-enhanced package altogether and rely on the official Express package. Ensure that your package.json does not include express-enhanced, and instead, use the following command to install the official Express package: npm install express.
Conclusion
The express-enhanced package has been identified as a significant security risk due to its malicious code that executes during installation. Users are strongly advised to remove this package and switch to the official Express package to ensure the security of their applications. Continuous monitoring for vulnerabilities is recommended.
See every vulnerability recorded for express-enhanced →
FAQ
express-enhanced is an npm package that claims to enhance the Express web framework but has been found to contain malicious code.
The vulnerability allows an attacker to execute arbitrary code on your machine during the installation of the express-enhanced package, potentially compromising your application and system.
You should immediately uninstall the express-enhanced package using npm uninstall express-enhanced and replace it with the official Express package.
No, there is no patched version of express-enhanced available. The only solution is to remove the package entirely.
You can use Vulert, which monitors and alerts in real-time for open-source vulnerabilities in your software. You can check if your application is affected by this vulnerability using the Vulert playground at Vulert Scanner without any signup.