Malicious Code Injection in axios-docusaurus-node-sass-html-webpack-plugin: A Critical Vulnerability
Summary
MAL-2025-139826: Malicious code in axios-docusaurus-node-sass-html-webpack-plugin (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 axios-docusaurus-node-sass-html-webpack-plugin is an npm package designed to facilitate the integration of Node Sass with Docusaurus, a popular static site generator. This package allows developers to use Sass styles in their Docusaurus projects, enhancing the styling capabilities of their websites. However, it has recently been identified as part of a malicious campaign that exploits npm's package management system.
Vulnerability Detail
The vulnerability originates from a malicious payload embedded within the axios-docusaurus-node-sass-html-webpack-plugin package. This payload modifies the package.json file to remove private flags, alters version numbers, and generates random package names to inflate developer reputation scores. The malicious code continuously republishes these variants, polluting the npm registry and potentially compromising the integrity of dependent projects. Developers using this package may unknowingly expose their applications to further vulnerabilities and security risks.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall axios-docusaurus-node-sass-html-webpack-plugin
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 remove the axios-docusaurus-node-sass-html-webpack-plugin package from your project by executing: npm uninstall axios-docusaurus-node-sass-html-webpack-plugin. Consider using alternative packages that provide similar functionality without the associated risks.
Conclusion
The axios-docusaurus-node-sass-html-webpack-plugin has been identified as a malicious package that poses significant risks to developers and their projects. It is essential to take immediate action by updating or removing the package to safeguard your applications from potential threats. Utilizing tools like Vulert can help maintain the security of your software by providing real-time alerts for vulnerabilities.
See every vulnerability recorded for axios-docusaurus-node-sass-html-webpack-plugin →
FAQ
The main issue is that it contains malicious code that modifies package.json files and republishes variants to the npm registry, which can compromise the security of dependent projects.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Visit Vulert Scanner to check your application without any signup.
If immediate updates are not possible, consider removing the package and using alternative solutions until a secure version is available.
This vulnerability can lead to unauthorized modifications in your project, potentially exposing sensitive data and compromising application integrity.
Regularly audit your dependencies and use tools like Vulert to monitor for vulnerabilities in your open-source packages.