---
title: "MAL-2025-190925: Malicious code in posthog-node (npm)"
description: "Malicious code in posthog-node (npm). Affects posthog-node; fixed in 6.0.5."
url: https://inlinr.com/advisories/MAL-2025-190925
lang: en
---

[Packages](https://inlinr.com/packages) / [posthog-node](https://inlinr.com/packages/posthog-node) / [Security](https://inlinr.com/packages/posthog-node/security)

Malicious package MAL-2025-190925 Published 24 Nov 2025

# Malicious code in posthog-node (npm)

Your version 

Compromised versions · [posthog-node](https://inlinr.com/packages/posthog-node)

- 5.11.3
- 5.13.3
- 4.18.1

Safe

Every other versionincluding the latest, 6.0.5

```
npm install posthog-node@6.0.5
```

6.x 

1. Not affected

6.0.0 – 6.0.5  
6 releases, latest

5.x 

1. Not affected

5.0.0 – 5.11.2  
33 releases
2. Affected

5.11.3  
1 release
3. Safe

5.12.0 – 5.13.2  
4 releases
4. Affected

5.13.3  
1 release
5. Safe

5.13.4 – 5.74.0  
234 releases

4.x 

1. Not affected

4.0.0 – 4.18.0  
41 releases
2. Affected

4.18.1  
1 release

370 stable releases of posthog-node, oldest to newest, one row per major.

## What happens

If one of these versions was installed

1. Treat the machines and CI runners that installed it as compromised.
2. Rotate the npm, GitHub and cloud tokens they could reach.
3. Reinstall from a lockfile that pins a version outside the list.

---

_\-= Per source details. Do not edit below this line.=-_

Source: amazon-inspector (c2ec4a50c0b553e9abbcc25147ad50014cf1488415e1ec8e3234f3e9bb3cc24e)

The package posthog-node was found to contain malicious code.

Source: google-open-source-security (5dac9bdcf8ac8226ec0441699268220426948df17dbc750b5724a663527c1822)

This package was compromised by the Sha1-Hulud: The Second Coming NPM worm. The malicious payload steals tokens and credentials and publishes them to GitHub. The worm will propogate itself to NPM packages the user owns and establish persistence is a GitHub action. The package may also destroy the user's home directory.

## References

- [Reference](https://www.aikido.dev/blog/shai-hulud-strikes-again-hitting-zapier-ensdomains "https://www.aikido.dev/blog/shai-hulud-strikes-again-hitting-zapier-ensdomains")  
aikido.dev/blog/shai-hulud-strikes-again-hittin…
- [Reference](https://www.wiz.io/blog/shai-hulud-2-0-ongoing-supply-chain-attack "https://www.wiz.io/blog/shai-hulud-2-0-ongoing-supply-chain-attack")  
wiz.io/blog/shai-hulud-2-0-ongoing-supply-chain…
- [Reference](https://www.stepsecurity.io/blog/sha1-hulud-the-second-coming-zapier-ens-domains-and-other-prominent-npm-packages-compromised "https://www.stepsecurity.io/blog/sha1-hulud-the-second-coming-zapier-ens-domains-and-other-prominent-npm-packages-compromised")  
stepsecurity.io/blog/sha1-hulud-the-second-comi…

A whole project to check? Paste its package.json in the [dependency check](https://inlinr.com/tools/dependency-check): every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.
