---
title: "Discussion on \"How npm worms steal your credentials, and the order to rotate them in\" | Hashnode"
description: "Discussion on \"How npm worms steal your credentials, and the order to rotate them in\". Almost every npm supply-chain advisory ends with the same instruction: rotate every credential the machine could access. It sounds simple until you try it at 2 AM. Which credentials did the machine ha"
url: "https://hashnode.com/posts/how-npm-worms-steal-your-credentials-and-the-order-to-rotate-them-in/6addc7f8a1cb4183f25888f3"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How npm worms steal your credentials, and the order to rotate them in](https://quietkernel.hashnode.dev/how-npm-worms-steal-your-credentials-and-the-order-to-rotate-them-in?utm_source=hashnode&utm_medium=feed)

Almost every npm supply-chain advisory ends with the same instruction: rotate every credential the machine could access. It sounds simple until you try it at 2 AM. Which credentials did the machine ha

Oct 25 · 9 min read · quietkernel.hashnode.dev  
Read the article

-   [#nodejs](https://hashnode.com/tag/nodejs)
-   [#devops](https://hashnode.com/tag/devops)
-   [#security](https://hashnode.com/tag/security)
-   [#npm](https://hashnode.com/tag/npm)

## Written by

[Krrish Kumar](https://hashnode.com/@quietkernel)

@quietkernel

  
[View profile](https://hashnode.com/@quietkernel)

Krrish Kumar, backend & AI engineer (Node.js/TypeScript)

Krrish Kumar, backend &amp; AI engineer (Node.js/TypeScript). I maintain secret-blast-radius, create-bullmq-app, zod-india and webhook-crash-lab.

## Responses 1

Markdown supported · ⌘↵ to post

[Damiano Bianda](https://hashnode.com/@damianobianda)

[Oct 25](https://hashnode.com/posts/how-npm-worms-steal-your-credentials-and-the-order-to-rotate-them-in/6addc7f8a1cb4183f25888f3/comment/6ade2875111cdce683fdd096)

The tensorlake detail that deserves more attention: it shipped with valid npm provenance, because the attacker published through the project's own release workflow. Provenance proves the package came from the maintainer's pipeline, not that the pipeline was honest, so the badge can't be treated as a safety signal for exactly the class of attack it was built against. Same shape as advisory scanners reporting green on a vulnerable box: the check inspects one layer while the exposure sits one layer over. Your npmrc grep belongs in CI as a pre-install gate, not just in incident response. One question: in the samples you reviewed, did the payloads actually read MCP config files with API keys in env blocks, or is that row from audit logic rather than observed behavior?
