Malicious Code Injection in antd-dagda-optimize-css-assets-webpack-plugin-remark Package
Summary
MAL-2025-139453: Malicious code in antd-dagda-optimize-css-assets-webpack-plugin-remark (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 antd-dagda-optimize-css-assets-webpack-plugin-remark package is part of the npm ecosystem, primarily used for optimizing CSS assets in web applications. It is designed to enhance the performance of web applications by minimizing CSS files. However, this package has been identified as part of a malicious campaign that exploits npm's package management system, leading to potential security risks for developers and their applications.
Vulnerability Detail
The vulnerability stems from malicious code embedded within the antd-dagda-optimize-css-assets-webpack-plugin-remark package. This package is associated with a token reward campaign that floods npm with derivative packages. The malicious payload modifies the package.json file by removing private flags, altering version numbers, and generating random package names. This behavior not only compromises the integrity of the npm registry but also poses risks to developers who may unknowingly use these compromised packages, leading to potential security breaches and loss of reputation.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall antd-dagda-optimize-css-assets-webpack-plugin-remark
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 antd-dagda-optimize-css-assets-webpack-plugin-remark package until a secure version is released. Additionally, consider using alternative packages that provide similar functionality without the associated risks.
Conclusion
The antd-dagda-optimize-css-assets-webpack-plugin-remark package has been identified as containing malicious code that compromises the security of applications using it. Developers are advised to update or remove the package and monitor their projects for vulnerabilities using tools like Vulert.
See every vulnerability recorded for antd-dagda-optimize-css-assets-webpack-plugin-remark →
FAQ
It is an npm package used for optimizing CSS assets in web applications, enhancing performance by minimizing CSS files.
The vulnerability can lead to the injection of malicious code, compromising the security of your application and potentially affecting its functionality.
You should immediately update the package to the latest secure version or remove it from your project until a fix is available.
You can use Vulert, which monitors and alerts in real-time for open-source vulnerabilities in your software using just package-lock.json. You can also check your application for vulnerabilities using the Vulert playground without any signup.
Yes, consider using other CSS optimization packages that do not have known vulnerabilities and are actively maintained.