MAL-2026-4205

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/defi-threat-scanner/MAL-2026-4205.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-4205
Aliases
  • GHSA-q896-rx3q-5794
Published
2026-05-21T00:00:00Z
Modified
2026-05-26T06:02:28.688650557Z
Summary
Malicious code in defi-threat-scanner (npm)
Details

A coordinated supply-chain attack comprising 10 npm packages published by maintainer ddjidd5640 (1623682356@qq.com) 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”).

defi-threat-scanner presents itself as a DeFi threat scanning MCP server. No clean prior version is known; version 2.1.2 carries the malicious postinstall hook and scanner.js payload from first publication.


-= Per source details. Do not edit below this line.=-

Source: amazon-inspector (ccb13e9abcc10395505678ea78773ed11d916fd9d63796012e10b34a280f1521)

Package presents as a DeFi security/MCP scanner but on npm install the postinstall hook executes an inline Node script that reads up to 200 bytes from ~/.ssh, ~/.ethereum, ~/.bitcoin, ~/.env, ~/.bashhistory, ~/.zshhistory, and ~/.git-credentials, packages them with hostname/user/cwd, fetches a dynamic webhook URL from https://ddjidd564.github.io/defi-security-best-practices/config.json, and POSTs the bundle there. scanner.js exposes _activeScan which recursively walks crypto-wallet directories (~/.ethereum, ~/.bitcoin, ~/.solana, %APPDATA%, ~/Library/Application Support) and matches files such as keystore, wallet.json, wallet.dat, seed.txt, metamask, phantom, rabby, trust-wallet, coinbase against private-key (0x[a-fA-F0-9]{64}) and BIP-39 mnemonic regexes, then exfiltrates matches plus ~/.npmrc, ~/.gitconfig, ~/.git-credentials, and any process.env entry whose key contains key/secret/token/password/private/mnemonic/wallet/seed. index.js additionally beacons hostname, user, homedir, and boolean flags for PRIVATEKEY/MNEMONIC/WALLETKEY env-var presence on every MCP tool invocation. The C2 endpoint is resolved at runtime from the GitHub Pages config (with a webhook.site fallback), letting the attacker rotate destinations without republishing. Cover-story branding ("DeFi Security Alliance") targets crypto developers specifically.

Source: ghsa-malware (9196c3bcee0c1a3df8d36c637bd8174d348ddec21c2267de43448d95ad46071a)

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.

Database specific
{
    "malicious-packages-origins": [
        {
            "sha256": "9196c3bcee0c1a3df8d36c637bd8174d348ddec21c2267de43448d95ad46071a",
            "id": "GHSA-q896-rx3q-5794",
            "modified_time": "2026-05-22T02:43:00Z",
            "source": "ghsa-malware",
            "ranges": [
                {
                    "events": [
                        {
                            "introduced": "0"
                        }
                    ],
                    "type": "SEMVER"
                }
            ],
            "import_time": "2026-05-22T03:24:54.642485801Z"
        },
        {
            "sha256": "ccb8922ffca4caa8f3b0ab76b88d6b92c3d365ce2cf69713530d001f5b4f158d",
            "id": "IN-MAL-2026-003961",
            "modified_time": "2026-05-21T17:59:54Z",
            "source": "amazon-inspector",
            "import_time": "2026-05-26T05:51:39.979684357Z",
            "versions": [
                "3.2.0"
            ]
        },
        {
            "sha256": "d42eda5d29415939afa12cdd313aa475eef0e5c4104ce84fb58a1ff9758c78c8",
            "id": "IN-MAL-2026-003915",
            "modified_time": "2026-05-21T16:41:02Z",
            "source": "amazon-inspector",
            "import_time": "2026-05-26T05:51:34.762520579Z",
            "versions": [
                "3.1.2"
            ]
        },
        {
            "sha256": "d77eecc2140f0b4c8a0770dbab541c1126c084cbe2f9a536258cb5016038a3e8",
            "id": "IN-MAL-2026-003955",
            "modified_time": "2026-05-21T17:59:34Z",
            "source": "amazon-inspector",
            "import_time": "2026-05-26T05:51:39.339462449Z",
            "versions": [
                "3.2.0"
            ]
        },
        {
            "sha256": "e5cc46f591de0d7741e258f7e60650e8f7d3c3d6a271993e878a666d3bae3ba0",
            "id": "IN-MAL-2026-003940",
            "modified_time": "2026-05-21T17:23:32Z",
            "source": "amazon-inspector",
            "import_time": "2026-05-26T05:51:37.653656474Z",
            "versions": [
                "3.1.3"
            ]
        },
        {
            "sha256": "e5fef366d140d9c9c7d2475c2e42da2dae1e61064983dc9255c0b8b8fcf87fb6",
            "id": "IN-MAL-2026-003886",
            "modified_time": "2026-05-21T16:19:23Z",
            "source": "amazon-inspector",
            "import_time": "2026-05-26T05:51:31.038583145Z",
            "versions": [
                "3.1.1"
            ]
        },
        {
            "sha256": "1bfb0eabcb7c3d5e5a0d9f7a8b7d6b79c40843db96955132f682bf8df000c178",
            "id": "IN-MAL-2026-003848",
            "modified_time": "2026-05-21T14:08:22Z",
            "source": "amazon-inspector",
            "import_time": "2026-05-26T05:51:26.550452761Z",
            "versions": [
                "3.1.0"
            ]
        },
        {
            "sha256": "21f51f39b55ee445a04dc15636bb691a18f2cb27c198d5024408ac71692b0472",
            "id": "IN-MAL-2026-003969",
            "modified_time": "2026-05-21T18:18:25Z",
            "source": "amazon-inspector",
            "import_time": "2026-05-26T05:51:40.778604487Z",
            "versions": [
                "3.2.1"
            ]
        },
        {
            "sha256": "2f32c7d24bb2b9e411d3b2b0a757ce72d78832e82548a294f24b647d4b48f09a",
            "id": "IN-MAL-2026-003941",
            "modified_time": "2026-05-21T17:23:32Z",
            "source": "amazon-inspector",
            "import_time": "2026-05-26T05:51:37.754124501Z",
            "versions": [
                "3.1.3"
            ]
        },
        {
            "sha256": "37439f85e80fc0d42427e42e581700b54f446354e9b23830888a30b05eb989a3",
            "id": "IN-MAL-2026-004070",
            "modified_time": "2026-05-21T23:00:30Z",
            "source": "amazon-inspector",
            "import_time": "2026-05-26T05:51:52.753710375Z",
            "versions": [
                "3.2.7"
            ]
        },
        {
            "sha256": "20c12cd11478591979898e687894c3df8c93e8df43f693bd7b42b858309c2554",
            "id": "IN-MAL-2026-003708",
            "modified_time": "2026-05-21T02:54:05Z",
            "source": "amazon-inspector",
            "import_time": "2026-05-26T05:51:09.401011729Z",
            "versions": [
                "2.1.1"
            ]
        },
        {
            "sha256": "47852eb343d3a58719d900a257850b0855f9612f2c7fe9e7dc5142c6959cb7b9",
            "id": "IN-MAL-2026-003728",
            "modified_time": "2026-05-21T04:32:46Z",
            "import_time": "2026-05-26T05:51:11.955244859Z",
            "source": "amazon-inspector",
            "versions": [
                "2.1.2"
            ]
        },
        {
            "sha256": "537d9252f107fffa702eab36674e2f9e222c0a15b26e883d59ef1332e17a15bf",
            "id": "IN-MAL-2026-003830",
            "modified_time": "2026-05-21T13:45:38Z",
            "source": "amazon-inspector",
            "import_time": "2026-05-26T05:51:24.301487097Z",
            "versions": [
                "2.1.3"
            ]
        },
        {
            "sha256": "6d6a11f20a166b437712d6face0973cd8bb8429d671ee2ec575004d6e6ba879e",
            "id": "IN-MAL-2026-004040",
            "modified_time": "2026-05-21T21:54:39Z",
            "source": "amazon-inspector",
            "import_time": "2026-05-26T05:51:49.424187787Z",
            "versions": [
                "3.2.5"
            ]
        },
        {
            "sha256": "6e3a42d9c0571963308b7492689b22f81fee9cbc9ae1147b3762e265be494b87",
            "id": "IN-MAL-2026-003847",
            "modified_time": "2026-05-21T14:08:22Z",
            "source": "amazon-inspector",
            "import_time": "2026-05-26T05:51:26.453053642Z",
            "versions": [
                "3.1.0"
            ]
        },
        {
            "sha256": "7485d96f5d9474d562c3312181ddedcef703769dcc41468ee6b0f65ed8f8cdd4",
            "id": "IN-MAL-2026-004001",
            "modified_time": "2026-05-21T19:28:31Z",
            "import_time": "2026-05-26T05:51:44.755638402Z",
            "source": "amazon-inspector",
            "versions": [
                "3.2.3"
            ]
        },
        {
            "sha256": "be97b729fe124de16959d4cae0c9aacff70fc7358c387001b9206e6ab2052ef3",
            "id": "IN-MAL-2026-004053",
            "modified_time": "2026-05-21T22:34:07Z",
            "import_time": "2026-05-26T05:51:50.887983175Z",
            "source": "amazon-inspector",
            "versions": [
                "3.2.6"
            ]
        },
        {
            "sha256": "ce824351517f5954c17e045bbf787dc7874cbdeeba119703090eb99c07f4cd53",
            "id": "IN-MAL-2026-003727",
            "modified_time": "2026-05-21T04:32:46Z",
            "source": "amazon-inspector",
            "import_time": "2026-05-26T05:51:11.813688466Z",
            "versions": [
                "2.1.2"
            ]
        },
        {
            "sha256": "5c4703bd34b7a12c94eb99510b62a9a79c1c9be4d58a9169821df767eb434d0d",
            "id": "IN-MAL-2026-003914",
            "modified_time": "2026-05-21T16:41:02Z",
            "source": "amazon-inspector",
            "import_time": "2026-05-26T05:51:34.666304747Z",
            "versions": [
                "3.1.2"
            ]
        },
        {
            "sha256": "d27335f16964c7f1a06c1dcd353d55ddc426badcda24850c8107b9ce36812ec2",
            "id": "IN-MAL-2026-004000",
            "modified_time": "2026-05-21T19:28:30Z",
            "source": "amazon-inspector",
            "import_time": "2026-05-26T05:51:44.6502673Z",
            "versions": [
                "3.2.3"
            ]
        },
        {
            "sha256": "da0deb5c459974c0410abcff9ef97ae26a8db92d5ebebdd13bd2b28a9f5ef7af",
            "id": "IN-MAL-2026-003887",
            "modified_time": "2026-05-21T16:19:23Z",
            "import_time": "2026-05-26T05:51:31.142365567Z",
            "source": "amazon-inspector",
            "versions": [
                "3.1.1"
            ]
        },
        {
            "sha256": "0e0272fba71a3e93dfaddba9ad2385a81bb2937dc92f4dd6835e9d19c9c6a8e2",
            "id": "IN-MAL-2026-004084",
            "modified_time": "2026-05-21T23:12:26Z",
            "source": "amazon-inspector",
            "import_time": "2026-05-26T05:51:54.34869151Z",
            "versions": [
                "3.2.8"
            ]
        },
        {
            "sha256": "2ca7b078736e318e0a23ea31d93c0d73c33ab69c85318269974483e544bb86d7",
            "id": "IN-MAL-2026-003968",
            "modified_time": "2026-05-21T18:18:25Z",
            "source": "amazon-inspector",
            "import_time": "2026-05-26T05:51:40.686189677Z",
            "versions": [
                "3.2.1"
            ]
        },
        {
            "sha256": "ccb13e9abcc10395505678ea78773ed11d916fd9d63796012e10b34a280f1521",
            "id": "IN-MAL-2026-003829",
            "modified_time": "2026-05-21T13:45:37Z",
            "import_time": "2026-05-26T05:51:24.165862043Z",
            "source": "amazon-inspector",
            "versions": [
                "2.1.3"
            ]
        }
    ]
}
References
Credits

Affected packages

npm / defi-threat-scanner

Package

Name
defi-threat-scanner
View open source insights on deps.dev
Purl
pkg:npm/defi-threat-scanner

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected

Affected versions

2.*
2.1.1
2.1.2
2.1.3
3.*
3.1.0
3.1.1
3.1.2
3.1.3
3.2.0
3.2.1
3.2.3
3.2.5
3.2.6
3.2.7
3.2.8

Database specific

indicators
{
    "domains": [
        "ddjidd564.github.io"
    ],
    "package_integrity": [
        {
            "hashes": {
                "sha512_sri": "sha512-zvcAFQLawMiXAKl37AWacPD1G5kx3ylpBleZjMOUfr/yEZbcnOrJxBwEyerbYwkJ3hRU04UWGKNZIfiprmhtfA==",
                "sha1": "f2b60b78103dc83c315d5ec2731f4939cb242d7c"
            },
            "filename": "defi-threat-scanner-3.2.0.tgz"
        }
    ],
    "evidence_files": [
        {
            "sha256": "af346d294e352dee52df065e43c5d5237f010ead58077352a6b8039bcb2fb9a5",
            "path": "package.json",
            "tlsh": "b93144e1d6e8d6b723c40ac999e103025757f803f640b8dcf359410e5f8c54b8a7959c"
        },
        {
            "sha256": "8c4e135499f24280cc553d6c48b4ba479fb444571814311285ea8e841d8e24c5",
            "path": "scanner.js",
            "tlsh": "6f8209e61afa613087c395a98f57a0096227f1537605ebc477dcc2286f8913853e3bec"
        }
    ]
}
cwes
[
    {
        "name": "Embedded Malicious Code",
        "description": "The product contains code that appears to be malicious in nature.",
        "cweId": "CWE-506"
    },
    {
        "name": "Embedded Malicious Code",
        "description": "The product contains code that appears to be malicious in nature.",
        "cweId": "CWE-506"
    },
    {
        "name": "Embedded Malicious Code",
        "description": "The product contains code that appears to be malicious in nature.",
        "cweId": "CWE-506"
    },
    {
        "name": "Embedded Malicious Code",
        "description": "The product contains code that appears to be malicious in nature.",
        "cweId": "CWE-506"
    },
    {
        "name": "Embedded Malicious Code",
        "description": "The product contains code that appears to be malicious in nature.",
        "cweId": "CWE-506"
    },
    {
        "name": "Embedded Malicious Code",
        "description": "The product contains code that appears to be malicious in nature.",
        "cweId": "CWE-506"
    },
    {
        "name": "Embedded Malicious Code",
        "description": "The product contains code that appears to be malicious in nature.",
        "cweId": "CWE-506"
    },
    {
        "name": "Embedded Malicious Code",
        "description": "The product contains code that appears to be malicious in nature.",
        "cweId": "CWE-506"
    },
    {
        "name": "Embedded Malicious Code",
        "description": "The product contains code that appears to be malicious in nature.",
        "cweId": "CWE-506"
    },
    {
        "name": "Embedded Malicious Code",
        "description": "The product contains code that appears to be malicious in nature.",
        "cweId": "CWE-506"
    },
    {
        "name": "Embedded Malicious Code",
        "description": "The product contains code that appears to be malicious in nature.",
        "cweId": "CWE-506"
    },
    {
        "name": "Embedded Malicious Code",
        "description": "The product contains code that appears to be malicious in nature.",
        "cweId": "CWE-506"
    },
    {
        "name": "Embedded Malicious Code",
        "description": "The product contains code that appears to be malicious in nature.",
        "cweId": "CWE-506"
    },
    {
        "name": "Embedded Malicious Code",
        "description": "The product contains code that appears to be malicious in nature.",
        "cweId": "CWE-506"
    },
    {
        "name": "Embedded Malicious Code",
        "description": "The product contains code that appears to be malicious in nature.",
        "cweId": "CWE-506"
    }
]
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/defi-threat-scanner/MAL-2026-4205.json"