Malicious Code Detected in posthog-docusaurus Package - Critical Vulnerability Alert
Summary
MAL-2025-190924: Malicious code in posthog-docusaurus (npm). Affects posthog-docusaurus versions 2.0.6. 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-docusaurus package is a tool designed for integrating PostHog analytics into Docusaurus documentation sites. It allows developers to track user interactions and gather insights on documentation usage. However, this package has been identified to contain malicious code, posing significant security risks to applications that utilize it.
Vulnerability Detail
The vulnerability originates from the inclusion of malicious code within the posthog-docusaurus package, specifically version 2.0.6. This code can potentially compromise the integrity of applications using the package, leading to unauthorized access, data breaches, or other malicious activities. The issue was identified by Amazon Inspector, highlighting the need for immediate attention and remediation.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall posthog-docusaurus
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, consider removing the posthog-docusaurus package from your project until a secure version is released. You can do this by running the command: npm uninstall posthog-docusaurus. This will help mitigate the risk associated with the malicious code.
Conclusion
The discovery of malicious code in the posthog-docusaurus package poses a serious threat to applications utilizing it. Immediate action is required to update or remove the package to safeguard against potential security breaches. Utilize tools like Vulert for ongoing monitoring of vulnerabilities in your software.
See every vulnerability recorded for posthog-docusaurus →
FAQ
posthog-docusaurus is a package that integrates PostHog analytics into Docusaurus documentation sites, allowing developers to track user interactions.
The malicious code found in the posthog-docusaurus package can compromise application security, potentially leading to unauthorized access and data breaches.
You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected by this vulnerability.
Yes, it is recommended to update the posthog-docusaurus package to a secure version as soon as it is released.
If you cannot update the package right away, consider removing it from your project as a temporary measure to mitigate risks.