Malicious Code Detected in @posthog/react-rrweb-player Package
Summary
MAL-2025-190890: Malicious code in @posthog/react-rrweb-player (npm). Affects @posthog/react-rrweb-player versions 1.1.4. 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 @posthog/react-rrweb-player package is a component used in React applications for playing back recordings of user sessions. It is designed to enhance user experience by providing insights into user interactions. However, recent findings have revealed that this package contains malicious code, posing significant security risks to applications that utilize it.
Vulnerability Detail
The vulnerability originates from a malicious code injection within the @posthog/react-rrweb-player package, specifically version 1.1.4. This malicious code can compromise the integrity of applications, potentially leading to unauthorized access, data breaches, or other malicious activities. The source of this vulnerability has been identified by Amazon Inspector, which flagged the package for containing harmful elements.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall @posthog/react-rrweb-player
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 may consider removing the @posthog/react-rrweb-player package from your project until a secure version is released. You can do this by running the command: npm uninstall @posthog/react-rrweb-player.
Conclusion
The @posthog/react-rrweb-player package has been flagged for containing malicious code, which poses serious security risks. It is essential to update or remove the package to protect your application from potential threats. Utilizing tools like Vulert can help monitor and manage vulnerabilities effectively.
See every vulnerability recorded for @posthog/react-rrweb-player →
FAQ
The malicious code can lead to unauthorized access to sensitive data, data breaches, or other harmful activities within your application.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. By analyzing your package-lock.json file, Vulert can provide real-time alerts. You can also check your application using the Vulert playground at Vulert Scanner.
Yes, it is recommended to check for a patched version of the package and update it as soon as possible to mitigate the risk.
If immediate updating is not possible, consider removing the package from your project as a temporary measure to prevent potential exploitation.
The vulnerability was reported by Amazon Inspector, which identified the malicious code in the package.