Critical Malicious Code Vulnerability in webpack-server-config Package
Summary
MAL-2025-6382: Malicious code in webpack-server-config (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 webpack-server-config package is a widely used npm package that facilitates the configuration of Webpack servers, enabling developers to build and serve applications efficiently. It is designed to streamline the development process by providing customizable server settings. However, this package has been identified to contain malicious code, posing significant security risks to any system where it is installed.
Vulnerability Detail
The vulnerability originates from the inclusion of embedded malicious code within the webpack-server-config package. This code can compromise the entire system, allowing unauthorized access to sensitive information such as secrets and keys. The ramifications of this vulnerability are severe, as it can lead to full control of the affected computer by an external entity. Users are advised to treat any system with this package installed as fully compromised.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall webpack-server-config
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
Currently, there are no effective workarounds other than removing the package entirely. It is recommended to rotate all secrets and keys stored on the affected system from a secure, unaffected computer.
Conclusion
The webpack-server-config package has been identified as containing malicious code that poses a significant security risk. Immediate action is required to remove the package and secure any sensitive information. Users should remain vigilant and utilize tools like Vulert to monitor for vulnerabilities in their applications.
See every vulnerability recorded for webpack-server-config →
FAQ
webpack-server-config is an npm package used for configuring Webpack servers, facilitating the development and serving of applications.
The malicious code can compromise your system, allowing unauthorized access to sensitive information and potentially giving control to an external entity.
You should immediately remove the webpack-server-config package and rotate any sensitive information stored on the affected system.
Currently, there is no patch available. The only solution is to remove the package from your system.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software using just package-lock.json. You can check your application for vulnerabilities without signup at the Vulert playground.