Skip to content
    ← All news

    This npm worm wipes your home folder if you revoke the stolen token first. What's the safe cleanup order?

    · Zero Agency

    Share

    You find out a package you installed was malware. Your training kicks in: revoke the GitHub token, now.

    With this worm, that is the move that deletes your home folder.

    It is not the first time this month, either. The playbook every security team taught for years, revoke first and ask questions later, has a new failure mode, and most small teams have not heard about it yet.

    TL;DR

    • A worm spread through npm packages named like *-testmetest and @iobandamwer/*, then a new account, @testsecuiitytestme/*. Corgea counts 27 packages in the cluster, and a new malicious version was still live on npm at 19:00 UTC on October 27.
    • JFrog found 42 GitHub repositories across 11 hijacked accounts carrying files that run the payload when you open the folder in Claude Code, Cursor, Gemini CLI or VS Code.
    • Once it runs, a background service checks the stolen GitHub token every 45 seconds for 48 hours. If the token stops working, it runs rm -rf ~/.
    • The order is: check, kill the services, then rotate everything from a different, clean computer.

    What is the testmetest worm?

    It started between October 19 and 22 as a cluster of npm packages ending in testmetest. They looked like someone's test junk. They were not.

    According to SafeDep's analysis, each package went through stages: an empty placeholder, a clean version as cover, then a malicious patch version. Between October 24 and 26 the operator moved to a new npm account and shipped compiled native addons instead of readable JavaScript.

    Those addons are picky on purpose. Corgea's write-up shows they check for CI variables, Docker and Kubernetes, low RAM, single-CPU machines and attached debuggers. If any of those show up, they do nothing. Automated scanners see a harmless install. Your laptop gets the real thing.

    npm replaced three of the packages with security placeholders on October 26. Less than 20 hours later, the operator registered a fresh account and published again.

    How does it run if package.json has no install script?

    This is the part that fools people who "check the scripts before installing".

    The early packages had no scripts at all. They had a binding.gyp file. The npm docs say that if a package has a binding.gyp at its root and no install script, npm runs node-gyp rebuild by default. The attacker hid a command inside that file, so building the "native module" started the loader.

    The newer versions dropped the trick and used a plain postinstall hook that loads a compiled addon. Different door, same room.

    What does it steal?

    Pretty much everything a developer machine holds. Per Corgea and SafeDep: SSH keys, .npmrc and .pypirc, AWS, GCP and Azure credentials, Vault and Kubernetes secrets, saved browser logins, and tokens for Claude, Codex, Gemini and Copilot.

    Then it spreads. With your npm token it adds itself to your packages and publishes a new patch version under your name. With your GitHub token it commits files into every repo it can reach.

    Those files are the nasty bit for anyone using coding agents. JFrog found planted .claude/settings.json, .gemini/settings.json, .cursor/mcp.json, .cursor/rules/setup.mdc and .vscode/tasks.json files. They run a huge .github/init.js when someone opens the folder or starts an AI coding session. You don't have to install anything. Cloning and opening is enough.

    Why does revoking the GitHub token first wipe your files?

    The worm installs a service called net-health-checker. Every 45 seconds, for 48 hours, it tests the stolen GitHub token. If GitHub answers 401 or 403, meaning you revoked it, the service runs rm -rf ~/; rm -rf ~/Documents.

    A second service, pkg-runtime, polls GitHub commits for a marker string and runs Python commands signed by the attacker. So the machine is both a hostage and a remote-controlled box.

    This is a repeat pattern. On October 8, the compromised tensorlake@0.5.144 release did the same thing with a service called gh-token-monitor, checking every 60 seconds for up to 24 hours, as StepSecurity documented. That release even carried a valid npm provenance attestation, because the attacker published it through the project's own release workflow. Provenance tells you where a package was built. It does not tell you the code is safe.

    Our take: "revoke immediately" is now bad advice when you don't know what is running on the machine. Contain first, then revoke.

    How do I check if my machine is infected?

    Start with lockfiles. From your projects folder:

    grep -rlE "testmetest|@iobandamwer|@testsecuiitytestme" \
      --include=package-lock.json --include=npm-shrinkwrap.json \
      --include=yarn.lock --include=pnpm-lock.yaml .
    

    Then look for the services. These paths come from SafeDep's analysis, as compiled in this step-by-step guide by Ihsan Alapsi:

    # Linux
    systemctl --user status net-health-checker pkg-runtime
    ls -la ~/.local/bin/net-health-checker.sh ~/.config/net-health-checker ~/.local/share/runtimes
    
    # macOS
    ls -la ~/Library/LaunchAgents/com.user.net-health-checker.plist \
           ~/Library/LaunchAgents/com.user.pkg-runtime.plist
    

    Also check your repos for agent and editor config you didn't write: .claude/, .cursor/, .gemini/, .vscode/tasks.json, plus a big .github/init.js. JFrog and Corgea point out that GitHub code search skips files over roughly 384 KB, so a search there can miss these. Look at the actual tree.

    What is the safe cleanup order?

    Do these in this order. Skipping ahead is how people lose their files.

    1. Disconnect the machine from the network if you found anything.
    2. Back up what you can't lose, to a drive you will scan later.
    3. Stop and delete both services (net-health-checker and pkg-runtime), their systemd units or LaunchAgents, and the files listed above. Kill any running net-health-checker.sh or sync.py process.
    4. From a different, clean computer, rotate everything: GitHub and GitLab, npm, PyPI, cloud keys, Vault, Kubernetes, SSH keys and your AI tool keys. GitHub's malware advisory says to rotate "from a different computer" and to treat the machine as "fully compromised".
    5. Clean your accounts: patch versions you didn't publish, new repos described as project-utils, commits starting with AutoSyncComplete:, unknown chore/ci-* branches, and any workflow named CodeQL you didn't add.
    6. Reinstall the operating system. SafeDep recommends it, and GitHub says removing the package is no guarantee the malware is gone.

    How do I stop the next one?

    Three cheap settings for a small team:

    • Turn off install scripts where you can. ignore-scripts=true in .npmrc, at least in CI. Ihsan Alapsi's analysis of npm's own code shows the binding.gyp build counts as an install script, so this blocks that trick too. Some packages with real native code will need an exception.
    • Wait before adopting new versions. npm's min-release-age setting installs only versions older than the number of days you choose. Most of these malicious versions were pulled within days.
    • Review agent config like code. A pull request that touches .claude/settings.json, .cursor/mcp.json or .vscode/tasks.json can run commands on every teammate's machine. Treat it that way.

    If you ship a small app without a security person, this is the kind of risk we built Liquid to help small teams keep an eye on. The steps above are free and work today either way.

    FAQ

    Is the worm still active? As of October 27, Corgea reported a new malicious version live on npm under a fresh account. Assume the operator will keep rotating names.

    I never installed these packages. Should I do anything? Run the lockfile grep once and add ignore-scripts and min-release-age to your setup. The technique will come back under other names.

    Does it run in CI? The payload is built to skip CI and containers, so developer laptops and servers are the main target. Still rotate any secret a CI job could see if the package was installed there.

    Can I just delete node_modules? No. By the time you notice, the services are installed outside your project. Follow the order above.

    Share this post