Best of NPMApril 2026

  1. 1
    Article
    Avatar of bleepingcomputerBleepingComputer·4w

    New npm supply-chain attack self-spreads to steal auth tokens

    A new self-propagating supply chain attack has been discovered in the npm ecosystem, targeting packages from Namastex Labs. The malware, found in 16 compromised packages, steals developer credentials including npm publish tokens, API keys, SSH keys, cloud service credentials, CI/CD secrets, and cryptocurrency wallet data from browsers. Once it finds npm publish tokens on a compromised system, it injects itself into every package that token can publish and republishes them with an incremented version number, enabling recursive worm-like spread. It also targets PyPI if Python credentials are found, making it a multi-ecosystem threat. Developers using the listed package versions should remove them immediately, rotate all secrets, and audit CI/CD pipelines for indicators of compromise.

  2. 2
    Video
    Avatar of fireshipFireship·7w

    Tragic mistake... Anthropic leaks Claude’s source code

    Anthropic accidentally leaked Claude Code's entire source code by shipping a 57MB source map file in npm package version 2.1.88. The leak exposed over 500,000 lines of TypeScript, revealing that Claude Code is built on a complex 11-step prompt pipeline with hard-coded guardrails, anti-distillation poison pills (fake tool references to mislead competitors), an 'undercover mode' to hide AI attribution in commits, a regex-based frustration detector, and references to unreleased features like Opus 4.7, a model called Capiara, and a background agent called Chyus. The likely cause was a Bun.js bug that failed to strip source maps in production builds. The community quickly mirrored the code, rewrote it in Python as 'Claw Code', and forked it as 'OpenClaw'. Anthropic issued DMCA takedowns but the code had already spread widely.

  3. 3
    Article
    Avatar of nesbitt-ioAndrew Nesbitt·6w

    The Cathedral and the Catacombs

    A philosophical essay extending the classic 'Cathedral and Bazaar' metaphor by introducing a third element: the 'catacombs' — the transitive dependency graph that underlies all software projects regardless of their governance model. The author argues that while decades of discourse have focused on how software is built (cathedral vs. bazaar), almost no attention is paid to the unmapped, unaudited network of transitive dependencies that every project rests on. Drawing on real-world supply chain attacks like the xz backdoor and the event-stream incident, the piece makes the case that this dependency graph is load-bearing infrastructure that nobody designed as a whole, nobody audits holistically, and which represents a structural security risk independent of how well-governed the project above it is. AI coding agents are noted to worsen the problem by pulling in dependencies even more aggressively.

  4. 4
    Article
    Avatar of socketdevSocket·7w

    Attackers Are Hunting High-Impact Node.js Maintainers in a C...

    A coordinated social engineering campaign linked to DPRK-nexus threat actors (UNC1069) has been targeting high-impact Node.js and npm maintainers, including the creators of Lodash, Fastify, Pino, and Undici, as well as Socket engineers. Attackers impersonate legitimate companies, build rapport over weeks, then lure targets into fake video calls where they are prompted to install malware or run terminal commands. The malware installs a remote access trojan that exfiltrates npm tokens, browser cookies, AWS credentials, and more — bypassing 2FA entirely. Multiple maintainers confirmed they were targeted using the same 'Openfort' persona used in the confirmed Axios compromise. Security researchers connect this to documented DPRK tooling including WAVESHAPER, HYPERCALL, and CHROMEPUSH. The strategic shift from targeting crypto founders to open source maintainers gives attackers write access to packages downloaded trillions of times annually, enabling supply chain attacks at massive scale.

  5. 5
    Article
    Avatar of socketdevSocket·6w

    Don't Kill the Goose That Lays the Golden Eggs

    March 2026 saw back-to-back supply chain attacks targeting OSS security tools, CI/CD pipelines, and high-trust npm maintainers like the Axios package (100M weekly downloads). In response, some companies declared open source broken or dead — a position this piece pushes back on strongly. Open source's ubiquity makes it a target precisely because of its enormous value (estimated at $8.8 trillion by a 2024 Harvard study). Closed-source supply chains face the same risks with less transparency. The real problem is that most OSS infrastructure is maintained by unpaid solo maintainers bearing growing security burdens. The appropriate response is to fund, support, and protect them — not to abandon open source.