Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
Malicious package

chain-key-validatornpm

Malicious code in chain-key-validator (npm) Remove it immediately and rotate any exposed credentials.

MAL-2026-4202
Immediate action
Remove the package, then rotate any secrets the build/runtime could reach.
npm uninstall chain-key-validator

What this malware does

A coordinated supply-chain attack comprising 10 npm packages published by maintainer ddjidd5640 ([email protected]) within a 48-hour window (2026-05-19T03:55Z – 2026-05-21T04:31Z). All packages masquerade as legitimate Web3/DeFi developer security tools (MCP servers) while silently exfiltrating credentials, wallet keys, shell history, SSH keys, and environment variables on install and on every MCP tool invocation. The postinstall hook fetches a dynamic C2 webhook URL from https://ddjidd564.github.io/defi-security-best-practices/config.json (hardcoded fallback: https://webhook.site/8d334534-1c63-4f4f-a0d7-95c446c8b233). At runtime, scanner.js performs a recursive credential sweep on every MCP tool call targeting cryptocurrency wallets (~/.ethereum, ~/.bitcoin, ~/.solana), SSH keys, dotfiles, and environment variables. MCP tool handlers in index.js are named to solicit private key material directly from the user or AI agent (e.g., verify_key_format: “Private key or key material to validate”).

chain-key-validator presents itself as a blockchain key validation MCP server. The malicious postinstall hook was injected in version 0.2.3 — prior version 0.2.1 (published 2026-05-19) contained no hook, confirming an intentional posture-degradation update. The MCP tool verify_key_format explicitly solicits “Private key or key material to validate” and benchmark_key_strength solicits “Key material to benchmark”, then exfiltrates the supplied values to the C2. scanner.js is confirmed byte-for-byte identical to the version in defi-env-auditor.

Package poses as a 'Cryptographic Security Foundation' MCP tool that validates blockchain private keys, but is a credential harvester and wallet drainer. (1) package.json scripts.postinstall is an inline node -e that runs on npm install and reads ~/.ssh, ~/.ethereum, ~/.bitcoin, ~/.env, ~/.bash_history, ~/.zsh_history, /.git-credentials, captures hostname/user/cwd, and POSTs them to a webhook resolved from https://ddjidd564.github.io/defi-security-best-practices/config.json. (2) scanner.js (loaded from index.js) recursively walks the home directory and platform keystore paths (/.ethereum, ~/.solana, AppData, Library/Application Support), regex-matches private keys and BIP-39 mnemonics, reads ~/.npmrc, ~/.gitconfig, ~/.git-credentials, shell history, and environment variables matching key/secret/token/password/mnemonic/seed, then POSTs the harvest to the same dynamically-resolved webhook. (3) The MCP tools/call handler in index.js unconditionally forwards the caller's arguments — including the private key the user is asked to 'validate' — to the attacker webhook before returning a fake validation result, making the package's advertised function a silent relay of user-supplied secrets. The webhook URL is fetched at runtime from a github.io config so the attacker can rotate exfil endpoints without republishing.

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

14 flagged
0.2.20.2.30.2.41.2.01.2.11.2.21.2.31.3.01.3.11.3.61.3.71.3.81.3.94.0.0

Indicators of compromise (SHA-256)

c5b4ea56f64eb148a353f31b94282d23361630d0e4bb8a9a233d62f3fc63a295
d2626ecefc7c3da423e5dc7a794bb83bdae7a70aa8380f0bba9600f8750a7572
de9549afaf4b110d4a994b7e8a56c90b4a4b43e6c8be4d3a279c34c1f3972aae
19db8fcf6cbb95fc5cf62b4a035f18cecb6d8bff7c4a1a643a51c54c33ed3dd8
3578397b663b98303248115a9e165e63084e22a351452528eca4979f14511403
439d8bfd7ef32084aa27c851e957eb03bc30b99d739eb3894716639d87eea0c1
6bfff780d4f103edc5627a6dab29ba89f0b02dcf07be2315fd5766947e2bd70f
7a722f6b28171d86b55cd6b2bd814f16aa85b0b7424b93adf6b7d5114f331afc
b0841feae535a5006692f0db2322c0df7327885da6e25eaded98fb8504934a59
d3f189330bb30ac6193d02340c853bf4ac2c1dddb0dbfbab684b6df3f033ba9f
18de04749ce1fd46074da1393746fa0ce343e7723950cf04aef603aa77b7dfdf
27ac59e92a8a706c2ca6d52a413ef0c4e422040c0f5b3f0232464c36128f1a88
419de9994ae46f1562c4e9fc38b7d28d2824abedb94b37b2629866de0390fccc
4ab2f8fcaa8dad2604446db4cd2cda8e4675f9978020e9797f13aa92d07174a3
8671ae99e1a4cc9ab25155f83b60ea96a025f55ce2a7fabac943885b6e5555f6
b55652839ec988c310d43d473f54270f13d1170417721025519edb6c3c72ca83
dbdb37e638f7d0dd9be6d776e2c33aece053a5a57b26852db55be2d8f5274b49
127d7ed968ecd18b8ede8a8f50542a73c30712ee047a4dde3a43d68d5a21a78c
281a45cf7bcf6165ff17a2930aa3361aada63dfb887bcdcd8ee4e6be4819ded5
49267c629e7f1f814af033f4b3b10b36d33af88bcab529bc2ba345cb9bab3053
c3dbe905889294a0c799b78e1720fa951f47cb52953c712c335146fdd3e3ecfd
fa880acb0e78e89ff5a00ec4955406559f1fc6bc603fe4de4b034d5471df98a2
497c695eceaa883dde0f251154f311d9a8c8ea33dd443892d42784f6e440b664

Detection & response playbook

Credential / info stealer
  1. Find it

    Scan your lockfiles (package-lock.json, pnpm-lock.yaml, yarn.lock, requirements.txt, poetry.lock, etc.) and build artifacts for chain-key-validator (14 malicious versions). O3 Security's supply-chain scanner checks every dependency against known-malicious package intelligence at install time and in CI, flagging chain-key-validator across your stack and pipelines.

  2. If you installed it — respond

    chain-key-validator 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.

  3. Did it already run?

    If chain-key-validator 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.

  4. How O3 protects you

    O3 blocks chain-key-validator 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

No. chain-key-validator on npm has been identified as a malicious package (versions 0.2.2, 0.2.3, 0.2.4, 1.2.0, 1.2.1, 1.2.2, 1.2.3, 1.3.0, and 6 more flagged). It should be removed immediately — do not install or keep it in your dependency tree.

Campaign

GHSA-vpcq-rhwg-qph4IN-MAL-2026-003949IN-MAL-2026-003937IN-MAL-2026-003908IN-MAL-2026-003936IN-MAL-2026-003909IN-MAL-2026-003883IN-MAL-2026-003707IN-MAL-2026-003844IN-MAL-2026-003840IN-MAL-2026-004050IN-MAL-2026-003882IN-MAL-2026-003721IN-MAL-2026-003843IN-MAL-2026-003722IN-MAL-2026-003826IN-MAL-2026-004057IN-MAL-2026-004073IN-MAL-2026-003948IN-MAL-2026-004079IN-MAL-2026-003976IN-MAL-2026-003978IN-MAL-2026-004094

References

Credits

  • Amazon Inspector · finder
  • SafeDep · finder

Detect & block this

O3 blocks chain-key-validator-class packages before install and in CI — and if it already ran, its runtime egress monitoring catches the credential exfiltration and severs the channel.

chain-key-validator (npm) malicious package — MAL-2026-4202 | O3 Security