Critical Malicious Code Vulnerability in @posthog/lemon-ui Package
Summary
MAL-2025-191295: Malicious code in @posthog/lemon-ui (npm). Affects @posthog/lemon-ui versions 0.0.1. 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/lemon-ui package is a component library designed for building user interfaces in web applications. It provides a set of reusable UI components that enhance the development experience by allowing developers to create consistent and visually appealing interfaces. However, this package has been compromised, making it susceptible to severe security threats.
Vulnerability Detail
The vulnerability stems from a malicious code injection by the Sha1-Hulud: The Second Coming NPM worm. This worm is designed to steal sensitive tokens and credentials from users and publish them to GitHub. It can propagate itself to other NPM packages owned by the user and establish persistence through a GitHub action. Additionally, the worm has the potential to destroy the user's home directory, leading to significant data loss and security breaches.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall @posthog/lemon-ui
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 can remove the @posthog/lemon-ui package from your project until a secure version is released. Use the following command to uninstall the package: npm uninstall @posthog/lemon-ui.
Conclusion
The @posthog/lemon-ui package has been compromised by a malicious worm that poses significant security risks, including credential theft and potential data loss. It is crucial to update the package as soon as a patched version is available and to monitor your projects for any signs of compromise.
See every vulnerability recorded for @posthog/lemon-ui →
FAQ
The malicious code is part of the Sha1-Hulud NPM worm, which steals tokens and credentials and can publish them to GitHub.
You can check if your application is affected by using Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Visit Vulert Scanner to use the Vulert playground.
If you have installed the compromised package, it is recommended to uninstall it immediately and monitor your system for any unauthorized access.
Yes, updating to a patched version of the @posthog/lemon-ui package will fix the vulnerability once it is released.
Yes, the worm can propagate itself to other NPM packages that you own, making it essential to act quickly.