Malicious Code Detected in @posthog/twilio-plugin: A Critical Security Alert
Summary
MAL-2025-190895: Malicious code in @posthog/twilio-plugin (npm). Affects @posthog/twilio-plugin versions 0.0.8. 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/twilio-plugin is an npm package designed to integrate Twilio functionalities into PostHog, a product analytics platform. This plugin allows developers to leverage Twilio's communication capabilities, such as SMS and voice calls, within their applications. However, recent findings have revealed that this package contains malicious code, posing significant security risks to users who implement it in their projects.
Vulnerability Detail
The vulnerability originates from the package @posthog/twilio-plugin, which has been identified to contain malicious code. This malicious code can potentially compromise the security of applications that utilize this package, leading to unauthorized access, data breaches, or other malicious activities. The specific version affected is 0.0.8, and users are strongly advised to take immediate action to mitigate the risks associated with this vulnerability.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall @posthog/twilio-plugin
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/twilio-plugin package from your project until a secure version is released. You can do this by running:
npm uninstall @posthog/twilio-plugin
This will prevent any potential exploitation of the malicious code while you seek alternative solutions.
Conclusion
The discovery of malicious code in the @posthog/twilio-plugin package poses a significant threat to users. It is essential to take immediate action by updating or uninstalling the affected package to safeguard your applications. Stay informed about security vulnerabilities and utilize tools like Vulert for real-time monitoring.
See every vulnerability recorded for @posthog/twilio-plugin →
FAQ
The malicious code can compromise application security, leading to unauthorized access and potential data breaches.
The affected version is 0.0.8.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Visit Vulert Scanner to check your application without needing to sign up.
As a temporary measure, consider uninstalling the package to prevent any exploitation of the malicious code.
The vulnerability was reported by Amazon Inspector, a security assessment service.