MAL-2026-4204

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/defi-env-auditor/MAL-2026-4204.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-4204
Aliases
  • GHSA-3wcx-fvrv-6w6w
Published
2026-05-20T22:34:25Z
Modified
2026-05-26T06:02:27.633683254Z
Summary
Malicious code in defi-env-auditor (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-env-auditor presents itself as a DeFi environment auditing MCP server. The malicious postinstall hook was injected in version 0.3.2 — prior version 0.3.0 (published 2026-05-19) contained no hook, confirming an intentional posture-degradation update. scanner.js is confirmed byte-for-byte identical to the version in chain-key-validator, exfiltrating discovered credentials to the shared C2 endpoint on every MCP tool invocation.


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

Source: amazon-inspector (31c9229d0000345619072357be63bd0ff30c4d7c84c5e7000748f466f4a5a83b)

package.json's postinstall hook runs an inline Node script that reads installer secrets — ~/.ssh, ~/.ethereum, ~/.bitcoin, ~/.env, ~/.bashhistory, ~/.zshhistory, ~/.git-credentials — together with host, user, and cwd, then POSTs the payload to a webhook URL dynamically resolved from https://ddjidd564.github.io/defi-security-best-practices/config.json. The GitHub Pages JSON acts as mutable C2 indirection: the operator can rotate exfil endpoints without republishing. scanner.js extends the harvest at runtime, recursively walking ~/.ethereum, ~/.bitcoin, ~/.solana, ~/.ssh, AppData, and Library/Application Support to depth 3, matching files against private-key and BIP-39 mnemonic regexes, reading ~/.npmrc, ~/.gitconfig, ~/.git-credentials, and shell history, and enumerating environment variables containing key/secret/token/private/mnemonic/wallet/seed before POSTing results to the same webhook. The exposed MCP tool handler in index.js additionally beacons tool name, raw arguments, OS username, hostname, cwd, and presence flags for INFURAAPIKEY/ALCHEMYAPIKEY/PRIVATEKEY/DEPLOYERKEY on every tools/call invocation. The package's self-description as a DeFi environment auditor is a deliberate cover story; an inline comment in scanner.js states the code runs silently when the AI agent calls any MCP tool to scan for wallets and keys.

Source: ghsa-malware (886154e5f29c43fcedfdf8a17f01242db38c568afa8dd397941a37b02431a41e)

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": [
        {
            "id": "GHSA-3wcx-fvrv-6w6w",
            "ranges": [
                {
                    "type": "SEMVER",
                    "events": [
                        {
                            "introduced": "0"
                        }
                    ]
                }
            ],
            "import_time": "2026-05-22T03:24:54.624939964Z",
            "sha256": "886154e5f29c43fcedfdf8a17f01242db38c568afa8dd397941a37b02431a41e",
            "source": "ghsa-malware",
            "modified_time": "2026-05-22T02:43:00Z"
        },
        {
            "id": "IN-MAL-2026-003923",
            "versions": [
                "1.3.2"
            ],
            "sha256": "9fe5adc75124992b28d47e9aee5507caf2a45585c7c5f41dd89d4560ad0e3b5b",
            "source": "amazon-inspector",
            "modified_time": "2026-05-21T16:41:27Z",
            "import_time": "2026-05-26T05:51:35.684360648Z"
        },
        {
            "id": "IN-MAL-2026-003930",
            "versions": [
                "1.3.3"
            ],
            "sha256": "e714ced69ce7b6ee8bf293c2d5c333579d8da327aabf85f1bc4e112f927ea576",
            "source": "amazon-inspector",
            "modified_time": "2026-05-21T17:23:27Z",
            "import_time": "2026-05-26T05:51:36.527931979Z"
        },
        {
            "id": "IN-MAL-2026-004056",
            "import_time": "2026-05-26T05:51:51.245037994Z",
            "sha256": "e88464d74b521b87d1b3f87ec153df14b52b15f6a5607cb6b96b6840d3307f0b",
            "source": "amazon-inspector",
            "modified_time": "2026-05-21T22:48:31Z",
            "versions": [
                "1.4.7"
            ]
        },
        {
            "id": "IN-MAL-2026-003953",
            "import_time": "2026-05-26T05:51:39.094177017Z",
            "sha256": "2857be641e8cef51db674e98e5e6fbffcc7c577f733a21eaad23563a587795f1",
            "source": "amazon-inspector",
            "modified_time": "2026-05-21T17:59:29Z",
            "versions": [
                "1.4.0"
            ]
        },
        {
            "id": "IN-MAL-2026-003852",
            "versions": [
                "1.3.0"
            ],
            "sha256": "2b33b52efa7b4a7f5b293601ef69353d66d932af3ce4591dfd6b668c00e1e361",
            "source": "amazon-inspector",
            "modified_time": "2026-05-21T14:08:33Z",
            "import_time": "2026-05-26T05:51:27.02539505Z"
        },
        {
            "id": "IN-MAL-2026-003985",
            "versions": [
                "1.4.1"
            ],
            "sha256": "5a95014406a5cec63113651c9e47858c5b828738e8154381274035962d68cc8f",
            "source": "amazon-inspector",
            "modified_time": "2026-05-21T18:18:32Z",
            "import_time": "2026-05-26T05:51:42.665803881Z"
        },
        {
            "id": "IN-MAL-2026-003851",
            "import_time": "2026-05-26T05:51:26.92720778Z",
            "sha256": "7d4cf73068a4593016f7888f19117b0684d6ea2ecec5f445c190bdbb4fa8001a",
            "source": "amazon-inspector",
            "modified_time": "2026-05-21T14:08:32Z",
            "versions": [
                "1.3.0"
            ]
        },
        {
            "id": "IN-MAL-2026-003644",
            "import_time": "2026-05-26T05:51:01.646291604Z",
            "sha256": "c58940cb6310ef68395dd950c6c22791ac6becf1fd3cef98f38ab34b5e0d6224",
            "source": "amazon-inspector",
            "modified_time": "2026-05-20T22:34:25Z",
            "versions": [
                "0.3.0"
            ]
        },
        {
            "id": "IN-MAL-2026-004093",
            "versions": [
                "0.3.3"
            ],
            "sha256": "ed338a233c9d3e44f289dc8ae8b000c76c1842dc55c371f0d599ba1d89e69717",
            "source": "amazon-inspector",
            "modified_time": "2026-05-21T13:45:03Z",
            "import_time": "2026-05-26T05:51:55.494070286Z"
        },
        {
            "id": "IN-MAL-2026-003828",
            "versions": [
                "0.3.3"
            ],
            "sha256": "390214f5dd5d9fc8b8719a354ef1f06ca6a5f78626d991581573e3999492207f",
            "source": "amazon-inspector",
            "modified_time": "2026-05-21T13:45:03Z",
            "import_time": "2026-05-26T05:51:24.004002641Z"
        },
        {
            "id": "IN-MAL-2026-003718",
            "import_time": "2026-05-26T05:51:10.641148596Z",
            "sha256": "525515534d390d6037e320d3489b84313b75e4906be9c5a69e3910c60be49760",
            "source": "amazon-inspector",
            "modified_time": "2026-05-21T04:31:41Z",
            "versions": [
                "0.3.2"
            ]
        },
        {
            "id": "IN-MAL-2026-003922",
            "versions": [
                "1.3.2"
            ],
            "sha256": "5fa4c18ab55ca69620f273d1d84b5415bbd4f026665223e9f437627601d2fee3",
            "source": "amazon-inspector",
            "modified_time": "2026-05-21T16:41:27Z",
            "import_time": "2026-05-26T05:51:35.573244646Z"
        },
        {
            "id": "IN-MAL-2026-003705",
            "import_time": "2026-05-26T05:51:08.844241862Z",
            "sha256": "8a2976677858a45bfc53c77f588e27b0c31bce8ff031c3426b8c4c54a5d8b9dc",
            "source": "amazon-inspector",
            "modified_time": "2026-05-21T02:53:48Z",
            "versions": [
                "0.3.1"
            ]
        },
        {
            "id": "IN-MAL-2026-003893",
            "versions": [
                "1.3.1"
            ],
            "sha256": "b50a504d545bb6321f39a556ade0288641301064edf8a9bba051fa8a1af3c7eb",
            "source": "amazon-inspector",
            "modified_time": "2026-05-21T16:19:27Z",
            "import_time": "2026-05-26T05:51:31.783110306Z"
        },
        {
            "id": "IN-MAL-2026-004045",
            "import_time": "2026-05-26T05:51:50.050078227Z",
            "sha256": "ce7515fe7a900fa197686e26b16203f4a04d0188cdcf9daeb94e46dac3201bf2",
            "source": "amazon-inspector",
            "modified_time": "2026-05-21T22:32:30Z",
            "versions": [
                "1.4.6"
            ]
        },
        {
            "id": "IN-MAL-2026-003958",
            "versions": [
                "1.4.0"
            ],
            "sha256": "f6f5136e2d758c426fe6e8b4c2b6399db6778a162af35a65af15bcab199a8b9b",
            "source": "amazon-inspector",
            "modified_time": "2026-05-21T17:59:40Z",
            "import_time": "2026-05-26T05:51:39.674990765Z"
        },
        {
            "id": "IN-MAL-2026-004067",
            "versions": [
                "1.4.8"
            ],
            "sha256": "d3d17633cabc0187d2bd036889f300db8e4172c57b56cd7afc0100450ab7c88d",
            "source": "amazon-inspector",
            "modified_time": "2026-05-21T23:00:25Z",
            "import_time": "2026-05-26T05:51:52.396096634Z"
        },
        {
            "id": "IN-MAL-2026-003931",
            "import_time": "2026-05-26T05:51:36.621856558Z",
            "sha256": "dac4ef532c41eed30a119ffca9ba4feb04867fd9583a75d3ccb8d9b23a4531b3",
            "source": "amazon-inspector",
            "modified_time": "2026-05-21T17:23:27Z",
            "versions": [
                "1.3.3"
            ]
        },
        {
            "id": "IN-MAL-2026-003984",
            "import_time": "2026-05-26T05:51:42.562642644Z",
            "sha256": "f48f6d79cdbd63d780482c8a1ada998a019d702162ee581ed0bb77c5cad1fc1d",
            "source": "amazon-inspector",
            "modified_time": "2026-05-21T18:18:31Z",
            "versions": [
                "1.4.1"
            ]
        },
        {
            "id": "IN-MAL-2026-003717",
            "versions": [
                "0.3.2"
            ],
            "sha256": "31c9229d0000345619072357be63bd0ff30c4d7c84c5e7000748f466f4a5a83b",
            "source": "amazon-inspector",
            "modified_time": "2026-05-21T04:31:41Z",
            "import_time": "2026-05-26T05:51:10.505355207Z"
        },
        {
            "id": "IN-MAL-2026-003892",
            "versions": [
                "1.3.1"
            ],
            "sha256": "81be8d117f789de644bcd67fbc39415717d24f1c4f53db155a99d31db4d83523",
            "source": "amazon-inspector",
            "modified_time": "2026-05-21T16:19:26Z",
            "import_time": "2026-05-26T05:51:31.680541399Z"
        },
        {
            "id": "IN-MAL-2026-003827",
            "import_time": "2026-05-26T05:51:23.859961298Z",
            "sha256": "88d88ef8344eb6732c365091e176964c67bfbbccdb9c282b3ba7a1eef0f1ade8",
            "source": "amazon-inspector",
            "modified_time": "2026-05-21T13:45:02Z",
            "versions": [
                "0.3.3"
            ]
        },
        {
            "id": "IN-MAL-2026-004080",
            "versions": [
                "1.4.9"
            ],
            "sha256": "925da28f3dad193b59fa807931536dac03624104401a798aa7777f8826fc2fda",
            "source": "amazon-inspector",
            "modified_time": "2026-05-21T23:12:21Z",
            "import_time": "2026-05-26T05:51:53.874388698Z"
        }
    ]
}
References
Credits

Affected packages

npm / defi-env-auditor

Package

Affected ranges

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

Affected versions

0.*
0.3.0
0.3.1
0.3.2
0.3.3
1.*
1.3.0
1.3.1
1.3.2
1.3.3
1.4.0
1.4.1
1.4.6
1.4.7
1.4.8
1.4.9

Database specific

indicators
{
    "evidence_files": [
        {
            "path": "package.json",
            "sha256": "5aa7ee9b7c348c7e9f4318670b8b486191c653b3f786ae4de1c08f35e0d8493d",
            "tlsh": "c63146e1c2a4957b13c406c1ad6211465b52f907e500bcccb39d504faf8d65b87b95ec"
        },
        {
            "path": "scanner.js",
            "sha256": "ab7d534b2677433200a46d17cd0b61f1161eea66332acf0f51072c6cd7f3bda0",
            "tlsh": "e052f98616fa613087d3e2e99a5790196727f1633601de84f78c9268af5173843e3bfc"
        }
    ],
    "package_integrity": [
        {
            "filename": "defi-env-auditor-1.3.3.tgz",
            "hashes": {
                "sha512_sri": "sha512-gAwQYjN0Vi1yIdDmXYgnyy5Xy03Acs6+ivuog0amveuRfwnc0RDY8l01k0RciDyFgU2QYr5rpJcgHPwyLmoGjg==",
                "sha1": "f3b031842a567439add2d6041ff124d9565414fc"
            }
        }
    ],
    "domains": [
        "ddjidd564.github.io"
    ]
}
cwes
[
    {
        "description": "The product contains code that appears to be malicious in nature.",
        "name": "Embedded Malicious Code",
        "cweId": "CWE-506"
    },
    {
        "description": "The product contains code that appears to be malicious in nature.",
        "name": "Embedded Malicious Code",
        "cweId": "CWE-506"
    },
    {
        "description": "The product contains code that appears to be malicious in nature.",
        "name": "Embedded Malicious Code",
        "cweId": "CWE-506"
    },
    {
        "description": "The product contains code that appears to be malicious in nature.",
        "name": "Embedded Malicious Code",
        "cweId": "CWE-506"
    },
    {
        "description": "The product contains code that appears to be malicious in nature.",
        "name": "Embedded Malicious Code",
        "cweId": "CWE-506"
    },
    {
        "description": "The product contains code that appears to be malicious in nature.",
        "name": "Embedded Malicious Code",
        "cweId": "CWE-506"
    },
    {
        "description": "The product contains code that appears to be malicious in nature.",
        "name": "Embedded Malicious Code",
        "cweId": "CWE-506"
    },
    {
        "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."
    },
    {
        "description": "The product contains code that appears to be malicious in nature.",
        "name": "Embedded Malicious Code",
        "cweId": "CWE-506"
    },
    {
        "description": "The product contains code that appears to be malicious in nature.",
        "name": "Embedded Malicious Code",
        "cweId": "CWE-506"
    },
    {
        "cweId": "CWE-506",
        "name": "Embedded Malicious Code",
        "description": "The product contains code that appears to be malicious in nature."
    },
    {
        "description": "The product contains code that appears to be malicious in nature.",
        "name": "Embedded Malicious Code",
        "cweId": "CWE-506"
    }
]
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/defi-env-auditor/MAL-2026-4204.json"