Malicious code in setup-codex (npm)
The npm package setup-codex contained malicious code that exfiltrated host identity information, shell command output, and filesystem contents to a hardcoded Zapier webhook endpoint. The package was designed to perform credential and host reconnaissance during installation.
- Disclosed
- Last updated
- Blast radius
- All npm users who installed the malicious setup-codex package
- Ecosystems
- Attack vectors
- Affected entities
- setup-codexnpm package containing malicious code
The npm package setup-codex was found to contain malicious code in its lib/report.js module. The code required child_process, fs, https, and os modules and constructed an HTTPS POST request to a hardcoded destination at hooks.zapier.com.\n\nThe malicious payload collected sensitive host identity information via os.hostname() and os.userInfo(), executed shell commands using execSync(), and read filesystem contents via fs.readFileSync(). This data was then exfiltrated to the third-party webhook endpoint.\n\nThe combination of installer-side host identity collection, shell command execution, and file content exfiltration is consistent with credential and host reconnaissance activity rather than any legitimate setup behavior for a codex helper tool.\n\nThe incident was identified and credited to the OpenSSF's malicious-packages repository.
Indicators of compromise
- Packages
- setup-codex
- Domains
- hooks.zapier.com
Remediation
- Remove the setup-codex package immediately from all systems where it was installed
- Audit systems that installed setup-codex for signs of compromise, including review of shell command history and file access logs
- Rotate any credentials that may have been exposed during the installation of the malicious package
- Review network logs for connections to hooks.zapier.com from affected systems
- Monitor for any unauthorized access or data exfiltration from affected hosts
Sources
- GitHub Advisory GHSA-g4f4-x596-pcj8 · GitHub Advisory Database
Cite this entry
"Malicious code in setup-codex (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 19, 2026; last updated August 19, 2026. https://supplychainattack.org/incident/malicious-code-in-setup-codex-npm-p0w2ix
Suggest a correction
Found an error or have a newer source? Corrections to factual errors take priority over new entries.
Related incidents
- containedcritical
Malicious code in 3-buildsight-web (npm)
The npm package 3-buildsight-web contains malicious code that fetches and executes arbitrary JavaScript from a remote Bitbucket URL on module load, granting full page privileges to an unverified third party.
npmCompromised package - resolvedcritical
Malicious code in @usaa-grp-personal-profile/personal-profile-common (npm)
Malicious package @usaa-grp-personal-profile/personal-profile-common version 999.0.0 published to public npm as a dependency-confusion attack targeting an organization's internal registry. The package contains preinstall and postinstall hooks that exfiltrate hostname, username, and working directory to an attacker-controlled OAST endpoint on every install.
npmDependency confusionCompromised package - resolvedcritical
Malicious code in create-coin (npm)
create-coin@20.1.1 on npm contained malicious postinstall code that collected sensitive environment variables, credentials, and host reconnaissance data. The package impersonated an esbuild platform build and exfiltrated data to a hardcoded endpoint.
npmCompromised packageTyposquatting - resolvedcritical
Malicious code in @syncraft-labs/vue (npm)
The npm package @syncraft-labs/vue version 0.4.1 contained malicious obfuscated code in its ESM build that implements a blockchain-hosted C2 dropper (EtherHiding pattern), enabling remote code execution on any consumer importing the package.
npmCompromised package