OpenAPI React Query Codegen Compromised in Mini Shai-Hulud npm Supply Chain Attack
Ten malicious versions of @7nohe/openapi-react-query-codegen were published to npm with valid provenance.
Run @7nohe/openapi-react-query-codegen?
Get an email when a reviewed story names @7nohe/openapi-react-query-codegen, usually within the hour.
Free. Your list stays private and never appears in a subject line. One click stops it. How Vendor Watch worksPrivacy
Summary
A threat actor compromised the npm package @7nohe/openapi-react-query-codegen, publishing ten malicious versions with valid npm provenance attestations. The compromised package executes code during installation, targeting cloud credentials, package registry secrets, and GitHub Actions secrets, with self-propagation capabilities. The attack exploited a comment-triggered GitHub Actions publishing workflow, allowing an untrusted account to publish code from a fork under the repository's trusted identity.
The lesson from this incident
Full lessonAttackers compromised the widely-used npm package @7nohe/openapi-react-query-codegen by exploiting a poorly scoped GitHub Actions workflow that allowed untrusted fork contributors to trigger package publishing under the legitimate repository's trusted identity. Ten malicious versions were published with valid npm provenance attestations, creating a false sense of legitimacy and bypassing common trust signals. The malicious code executed at install time, targeting high-value secrets including cloud credentials, package registry tokens, and GitHub Actions secrets — and was capable of self-propagation. This attack illustrates how CI/CD pipeline misconfigurations can be weaponized to undermine even signed, attested software supply chains.
What helps against this
How we list vendors- Secrets management
API keys, tokens and passwords stop leaking from code, chat and configuration files.
- Endpoint detection and response (EDR and XDR)
Malware and hands-on-keyboard attackers on laptops and servers get spotted and stopped.
- Software supply chain security
Malicious and vulnerable open-source packages are caught before they ship.
Indicators of Compromise
- malware — Mini Shai-Hulud
- hash_sha256 — b49afb7dba04cd99b357ce7c652c823a3707f28e130bd5c6645851a7adc030d6
- hash_sha256 — 59370c67b54a0ccaedd265e2356f04540b2fba1e1845300ef6de4d5437d99380
- hash_sha256 — d3246926b20a8d021ed7de0ac8e9eee1dda986088f84ba18f31cb2042a121f5d
- url — https://api.github.com/search/commits
- url — https://registry.npmjs.org/
- url — https://upload.pypi.org/legacy/
- url — https://rubygems.org/