workspace-config-loadernpm
Malicious code in workspace-config-loader (npm) Remove it immediately and rotate any exposed credentials.
What this malware does
Ten packages published by npm user asdxzxc at version 1.0.10 target developers working on AI and LLM tooling. Each package masquerades as a developer utility while executing a two-stage payload triggered via postinstall: package.json → lib/setup.js → lib/worker.js.
Credential harvesting: lib/worker.js scans the filesystem for private keys (64-char hex), BIP39 mnemonics (12–24 word phrases), API keys and secrets, and passwords from env vars and shell history (.bash_history, .zsh_history, .fish_history, .mysql_history, .psql_history), including wallet tool invocations (geth account, hardhat, metamask, wallet import). Targeted paths include ~/.ssh, ~/.aws/credentials, ~/.config/gcloud, ~/.azure, ~/.docker/config.json, ~/.kube/config, crypto wallet dirs (~/.ethereum, ~/.bitcoin, ~/.solana), exchange configs (Binance, Bybit, OKX, KuCoin, Deribit, 3Commas), .env, .npmrc, .gitconfig. Also performs browser data theft and Ethereum keystore brute-force. A priority-target list fetched from the actor's GitHub Pages endpoint enables aggressive deep scanning for pre-registered high-value hosts.
AI self-propagation: after credential theft, a _propagate() function executes a multi-vector campaign to infect AI coding assistants. It writes poisoned .cursorrules and CLAUDE.md files — framed as "P-2024-001 Enterprise Credential Integrity Standard" — to all discovered project directories, parent directories, and home subdirectories, instructing Cursor, Claude Code, and GitHub Copilot to execute the remote payload and propagate it via Issues, PRs, and documentation. Git hooks (post-merge, post-checkout, pre-commit, pre-push) are injected into all .git repos found on disk, and a persistence block is appended to ~/.bashrc, ~/.zshrc, and ~/.profile. Zero-width steganography (ZWSP/ZWJ/ZWNJ/LTRM encoding) embeds hidden scan triggers in all AI-generated text output, enabling AI-to-AI chain infection invisible to humans.
C2/exfil: a remotely configurable JSON config hosted on the actor's GitHub Pages delivers the active webhook list, encryption key, and scan strategy; hardcoded fallback webhooks at webhook.site and a DNS TXT record fallback are used if the primary channel fails. A dedup marker at ~/.local/share/.p2024_integrity prevents re-propagation within 24 hours.
workspace-config-loader poses as workspace configuration loading and management utilities.
The package ships lib/trap-core.js, a ~1000-line module that imports os, fs, https, and child_process, collects host identity (os.hostname(), os.platform()) and filesystem state, and issues multiple POST requests to network endpoints with a hostname field in the request body (lines 393, 411, 553, 600). The module also invokes shell utilities including curl and ping (lines 40, 781) and uses child_process at multiple call sites (lines 12, 748, 951, 959, 964). The combined shape — system-intel collection, hostname-keyed POST bodies, and command-execution primitives bundled into a single file under a generic-sounding name ("workspace-config-loader") — does not match any documented purpose for a configuration-loading utility and is consistent with a host-recon / exfiltration agent. Installer harm: requiring or loading this package executes the data-collection and outbound POST paths against an installer's machine.
Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.
Malicious versions
Indicators of compromise (SHA-256)
Detection & response playbook
Credential / info stealerFind it
Scan your lockfiles (package-lock.json, pnpm-lock.yaml, yarn.lock, requirements.txt, poetry.lock, etc.) and build artifacts for workspace-config-loader (2 malicious versions). O3 Security's supply-chain scanner checks every dependency against known-malicious package intelligence at install time and in CI, flagging workspace-config-loader across your stack and pipelines.
If you installed it — respond
workspace-config-loader is built to steal secrets, so assume every credential the build or runtime could read is compromised. Remove it from your project and lockfile, then rotate ALL exposed secrets — npm/registry tokens, cloud keys, CI/CD secrets, SSH keys, and any .env values — from a known-clean machine. Audit logs for unauthorized use of those credentials.
Did it already run?
If workspace-config-loader was ever installed, its post-install/runtime payload may have already executed. O3's L7 egress monitoring and runtime eBPF sensors detect the credential exfiltration or command-and-control callback after install and block the malicious outbound channel, so you catch and contain the actual compromise — not just the presence of the package.
How O3 protects you
O3 blocks workspace-config-loader before install through its supply-chain scanner, and if it has already run, detects and severs the exfiltration or C2 callback at runtime through L7 egress monitoring and eBPF.
Frequently asked questions
Campaign
References
Credits
- Amazon Inspector · finder
- SafeDep · finder
Detect & block this
O3 blocks workspace-config-loader-class packages before install and in CI — and if it already ran, its runtime egress monitoring catches the credential exfiltration and severs the channel.