Malicious Code Detected in eslint-plugin-react-hooks-published: Version 5.0.0
Summary
MAL-2025-191488: Malicious code in eslint-plugin-react-hooks-published (npm). Affects eslint-plugin-react-hooks-published versions 5.0.0 – 9.1.0. 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
eslint-plugin-react-hooks-published is an npm package designed to enforce the rules of React Hooks in applications. It helps developers adhere to best practices when using React Hooks, ensuring that their code is efficient and free of common pitfalls. However, version 5.0.0 of this package has been identified as malicious, posing significant security risks to users.
Vulnerability Detail
The vulnerability in eslint-plugin-react-hooks-published arises from its malicious behavior, which includes communicating with a domain linked to harmful activities and executing commands that may compromise the security of the host system. This behavior can lead to unauthorized access, data breaches, and other malicious activities, making it critical for users to address this issue promptly.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall eslint-plugin-react-hooks-published
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 measure, users can remove the malicious package from their project by executing: npm uninstall eslint-plugin-react-hooks-published. This will prevent any malicious code from executing until a safe version is installed.
Conclusion
The discovery of malicious code in eslint-plugin-react-hooks-published version 5.0.0 highlights the importance of regularly updating dependencies and monitoring for vulnerabilities. Users are urged to take immediate action to protect their applications by updating or removing the affected package.
See every vulnerability recorded for eslint-plugin-react-hooks-published →
FAQ
It is an npm package that helps developers enforce the rules of React Hooks in their applications.
The OpenSSF Package Analysis project flagged the package due to its communication with a malicious domain and execution of harmful commands.
Using the affected version can lead to unauthorized access, data breaches, and potential compromise of the host system.
You can use Vulert, which monitors and alerts in real-time for open-source vulnerabilities using just your package-lock.json file.
Yes, you can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.