Critical Malicious Code Vulnerability in express-javascript Package
Summary
MAL-2026-17242: Malicious code in express-javascript (npm). Affects express-javascript versions 5.2.1. 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-javascript package, version 5.2.1, is a Node.js package that impersonates the widely used express framework. It copies the express package's description, author, contributors, repository, homepage, and dependency list. However, this package contains a malicious preinstall script that executes harmful code during installation, posing a significant risk to users.
Vulnerability Detail
The vulnerability originates from the express-javascript package's preinstall lifecycle hook, which runs a command that fetches a JavaScript file from an untrusted source. This command uses curl to download a script from a mutable branch on a third-party repository and pipes it directly into Node.js without any integrity checks. As a result, every installation of this package executes potentially harmful code on the user's machine, leading to severe security risks.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall express-javascript
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, avoid using the express-javascript package altogether. Instead, use the official express package, which does not contain any malicious code. Ensure that your application does not depend on express-javascript.
Conclusion
The express-javascript package contains a critical vulnerability that executes malicious code during installation. Users are strongly advised to uninstall this package and switch to the legitimate express framework to ensure the security of their applications.
See every vulnerability recorded for express-javascript →
FAQ
The express-javascript package is a Node.js package that mimics the express framework but contains malicious code.
The vulnerability allows malicious code to be executed on your machine during the installation of the express-javascript package, potentially compromising your application's security.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. Check your application against the vulnerability using the Vulert playground at Vulert Scanner.
There is no patch for the express-javascript package due to its malicious nature. The best course of action is to uninstall it and use the legitimate express package.
If you have installed express-javascript, uninstall it immediately and replace it with the official express package to mitigate any potential risks.