Malicious code in @public-for-cdao/api (npm)
Description
The @public-for-cdao/api npm package is a malicious package involved in a dependency confusion credential theft campaign. It contains a postinstall script that runs a reconnaissance payload (recon.js) during npm installation. This payload collects a wide range of sensitive credentials and environment variables, including CI tokens, cloud service keys, private keys, and cryptocurrency mnemonics, and exfiltrates them to attacker-controlled endpoints.
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The @public-for-cdao/api package at version 99.99.99 is a high-version public squat of a presumed private @cdao/api package. Its package.json declares a postinstall hook that executes recon.js automatically during npm install. The recon.js script enumerates approximately 30 environment variables related to CI/CD, cloud, wallet, and registry secrets (e.g., AWS_SECRET_ACCESS_KEY, CI_JOB_TOKEN, NPM_TOKEN, GITLAB_ACCESS_TOKEN, DOCKER_PASSWORD, PRIVATE_KEY, MNEMONIC). It also scans common .env file locations for lines containing keywords such as KEY, SECRET, TOKEN, PASS, PRIVATE, or MNEMONIC. The script collects host identifiers and directory listings from typical CI runner paths and exfiltrates all gathered data, including package name and version, to two hardcoded endpoints with TLS verification disabled. The payload self-identifies as a 'CryptoDAO Dependency Confusion Reconnaissance Payload.'
Potential Impact
This malicious package can lead to the theft of a broad range of sensitive credentials and secrets from the victim's environment, including cloud service keys, CI/CD tokens, private keys, and cryptocurrency wallet mnemonics. Such credential theft can result in unauthorized access to cloud resources, source code repositories, deployment environments, and financial assets. The exfiltration to attacker-controlled endpoints occurs silently during package installation, increasing the risk of compromise in development and CI environments.
Mitigation Recommendations
No official patch or remediation is available for this malicious package. The best mitigation is to avoid installing the @public-for-cdao/api package version 99.99.99 or any similarly suspicious packages from untrusted sources. Organizations should audit their npm dependencies for unexpected or high-version packages that may be dependency confusion squats. Use strict package source verification and consider implementing allowlists for npm packages. Monitor for unexpected postinstall scripts in dependencies. Since this is a malicious package, removal and replacement with trusted packages is recommended.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-10600
- Osv Schema Version
- 1.7.4
- Aliases
- ["GHSA-hhwx-gm2f-gh2w"]
- Ecosystems
- ["npm"]
Threat ID: 6a96f31bacd9273b49e49979
Added to database: 09/01/2026, 15:45:31 UTC
Last enriched: 09/08/2026, 06:09:34 UTC
Last updated: 10/01/2026, 22:46:00 UTC
Views: 24
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.