Malicious Code Vulnerability in react-adparser: A Critical Security Risk
Summary
MAL-2025-191581: Malicious code in react-adparser (npm). Affects react-adparser versions 2.0.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
react-adparser is an npm package designed to parse and manage advertisements in React applications. It provides developers with tools to easily integrate ad content into their projects, enhancing user engagement and monetization opportunities. However, this package has been identified as having a serious vulnerability that exposes applications to potential malicious code execution.
Vulnerability Detail
The vulnerability in react-adparser stems from the introduction of malicious code within version 2.0.1 of the package. This code can compromise the security of applications utilizing this package, potentially leading to unauthorized access, data breaches, or other malicious activities. The issue was reported by ReversingLabs, highlighting the need for immediate attention from developers using this package.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall react-adparser
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
If immediate updating is not feasible, consider removing the react-adparser package from your project until a secure version is released. You can do this by running: npm uninstall react-adparser. Additionally, review your application's dependencies to ensure no other vulnerable packages are present.
Conclusion
The discovery of malicious code in the react-adparser package poses a significant risk to applications using it. Developers must take immediate action to update or remove the package to safeguard their applications from potential threats. Utilizing tools like Vulert can help monitor vulnerabilities in real-time.
See every vulnerability recorded for react-adparser →
FAQ
react-adparser is used to parse and manage advertisements in React applications, allowing developers to integrate ad content seamlessly.
You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check your application without needing to sign up.
Using the vulnerable version can lead to unauthorized access, data breaches, and other malicious activities that can compromise your application's security.
Yes, updating to the latest version of react-adparser will address the vulnerability. Always check for the latest updates.
Consider removing the react-adparser package from your project until a secure version is available, and review other dependencies for vulnerabilities.