VentureBeat
Follow
The Shai-Hulud npm worm didn't fake its security check — it earned a legitimate one
An attacker recently compromised a prominent developer's GitHub account, leading to the release of malicious versions of the keyv and related npm packages. These poisoned packages contained a credential-stealing worm that quickly spread, affecting thousands of packages with billions of monthly installs. The attack is concerning because the malicious releases initially possessed valid provenance signatures, making them appear legitimate. This incident aligns with recent predictions of evolving software supply chain attacks targeting the developer ecosystem directly.The worm's method of earning provenance involved pushing malicious code through compromised GitHub Actions workflows, generating authentic attestations. The widespread impact occurred when the payload harvested credentials and used them to backdoor other packages controlled by victims. This campaign leveraged transitive dependencies to infect packages used by large organizations, even those who had not directly installed the compromised libraries. The ultimate goal of the malware was to steal cloud access keys and production infrastructure tokens.Beyond stealing credentials, the worm installed persistence payloads into developer tools like Visual Studio Code and AI coding assistants, allowing continued execution. Experts suggest that delaying dependency updates to use slightly older versions can significantly mitigate such risks, a feature now available in npm and pnpm. Prompt patching of actively exploited vulnerabilities, as highlighted by CISA's catalog, is also crucial. GitHub has implemented defenses like mandatory two-factor authentication and disabling preinstall scripts by default in newer npm versions, but account takeover remains a primary vulnerability.The industry is shifting towards contractual obligations for software security, placing liability on vendors and maintainers. Addressing these attacks requires governance decisions, such as enforcing provenance and trusted publishing, implementing minimum release age for dependencies, and requiring recent npm versions. The attack highlighted that identity governance, not just package provenance, is a critical weakness, with attackers logging in rather than hacking in. The ultimate destination of these attacks is the cloud, with supply chain compromise being a growing pathway for criminal activity.