Subscribe to the Non-Human & AI Identity Journal

Notifications
Clear all

Typosquatted npm packages and Shai-Hulud clones: what changed?


(@nhi-mgmt-group)
Member Moderator
Joined: 1 year ago
Posts: 15051
Topic starter  

TL;DR: Four malicious npm packages used typo-squatting, infostealer code, cloud credential theft, and one DDoS botnet payload, with one package closely cloning the leaked Shai-Hulud source and exfiltrating secrets to external C2 servers, according to OXSecurity. The pattern shows how open malware reuse, package drift, and developer tooling exposure are accelerating supply chain abuse.

NHIMG editorial — based on content published by OXSecurity: Four malicious npm packages and a Shai-Hulud clone were detected

By the numbers:

  • The total number of weekly downloads stands at 2,678.

Questions worth separating out

Q: What breaks when malicious npm packages are allowed to run on developer endpoints?

A: They can turn install-time trust into code execution, then harvest browser-stored secrets, cloud tokens, and local credentials before defenders detect the compromise.

Q: Why do malicious open source packages so often lead to cloud and repository exposure?

A: Because developer systems are packed with reusable credentials.

Q: What do security teams get wrong about supply chain malware persistence

A: They often focus only on package registry poisoning and miss local execution state.

Practitioner guidance

  • Block typo-squatted dependency names at the registry edge Add package allowlists and name-variation checks for critical developer environments, then quarantine packages that resemble known libraries but differ by one or two characters.
  • Rotate secrets exposed on developer machines immediately Revoke cloud keys, SSH credentials, repository tokens, and wallet-related secrets that may have been present on the affected endpoint.
  • Hunt for persistence and secondary payloads Check for local services, scheduled tasks, startup entries, and outbound traffic to unknown domains after package execution.

What's in the full analysis

OXSecurity's full analysis covers the operational detail this post intentionally leaves for the source:

  • Side-by-side code comparison of the chalk-tempalte Shai-Hulud clone and the leaked source
  • Package-by-package indicators of compromise, including the C2 endpoints and payload differences
  • Malware-specific exfiltration paths for SSH keys, cloud credentials, crypto wallets, and environment variables
  • The recommended detection and cleanup workflow for affected npm users and developer teams

👉 Read OXSecurity's analysis of malicious npm clones and Shai-Hulud copycat malware →

Typosquatted npm packages and Shai-Hulud clones: what changed?

Explore further

View Full Forum →  |  NHI Foundation Course →



   
Quote
(@mr-nhi)
Member Moderator
Joined: 3 months ago
Posts: 14635
 

Supply chain malware is now an identity exposure problem, not just a software integrity problem. These npm packages did not need a memory corruption exploit or a novel zero-day to succeed. They only needed access to machines where secrets already existed in environment variables, keys, and developer tooling. That means software supply chain defence has to include credential governance, not only dependency scanning. Practitioner conclusion: if the host can reach production identity, package abuse becomes an access incident.

A few things that frame the scale:

  • 91.6% of secrets remain valid five days after the targeted organisation is notified, showing a critical gap in remediation procedures, according to Ultimate Guide to NHIs , Why NHI Security Matters Now.
  • Our research shows only 20% have formal processes for offboarding and revoking API keys, and even fewer have procedures for rotating them.

A question worth separating out:

Q: How should organisations respond when malicious code has already run in a build or developer environment?

A: Contain the endpoint, revoke the exposed secrets, and check for follow-on compromise in repositories and cloud accounts. Uninstalling the package is not sufficient if persistence, exfiltration, or secondary payloads were already established. Response has to cover the host, the identities it touched, and any downstream systems those identities can reach.

👉 Read our full editorial: Malicious npm clones expose a broader supply chain malware pattern



   
ReplyQuote
Share: