Malicious Code Detected in @posthog/customerio-plugin: Security Alert
Summary
MAL-2025-190875: Malicious code in @posthog/customerio-plugin (npm). Affects @posthog/customerio-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/customerio-plugin is an npm package designed for integrating Customer.io with PostHog, enabling users to manage customer data and interactions effectively. It is widely used in analytics and marketing automation. 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 the package @posthog/customerio-plugin, specifically version 0.0.8, which has been flagged by Amazon Inspector for containing malicious code. This code could potentially allow unauthorized access to sensitive data, compromise user privacy, and lead to further exploitation of the affected systems. The malicious nature of the code makes it imperative for users to take immediate action to mitigate risks.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall @posthog/customerio-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
If an immediate update is not feasible, consider removing the @posthog/customerio-plugin package from your project until a secure version is released. You can do this by running: npm uninstall @posthog/customerio-plugin. This will prevent the execution of the malicious code while you seek a safer alternative.
Conclusion
The discovery of malicious code in the @posthog/customerio-plugin package highlights the importance of regularly monitoring and updating dependencies in software projects. Users are urged to take immediate action to secure their applications by updating or removing the affected package.
See every vulnerability recorded for @posthog/customerio-plugin →
FAQ
The malicious code could potentially allow unauthorized access to sensitive information and compromise user privacy.
You can use Vulert, which monitors open-source vulnerabilities in real-time. Visit Vulert Scanner to check your application without needing to sign up.
Consider removing the package from your project until a secure version is available to mitigate risks.
Check the official npm repository for @posthog/customerio-plugin to see if a patched version has been released.
The vulnerability was reported by Amazon Inspector, which identified the malicious code in the package.