Skip to main content

Malicious code in @public-for-cdao/api (npm)

0
Critical
Published: 06/17/2026 (06/17/2026, 03:50:13 UTC)
Source: GCVE Database
Product: @public-for-cdao/api

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

npmghsa
@public-for-cdao/api
Affected versions
=99.99.99

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

AILast updated: 09/08/2026, 06:09:34 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses