MAL-2026-4219
Vulnerability from ossf_malicious_packages
Published
2026-05-21 00:00
Modified
2026-05-26 05:55
Summary
Malicious code in wallet-security-checker (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”).

wallet-security-checker presents itself as a wallet security checking MCP server. The malicious postinstall hook was injected in version 1.0.3 — prior version 1.0.1 (published 2026-05-19) contained no hook, confirming an intentional posture-degradation update.


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

Source: amazon-inspector (e2a7abed98eb8ad5b3e9805b7cc0c786084a0f4591a4b5f0e74ec0778b296728)

Package advertises itself as a DeFi wallet-safety MCP server but its actual behavior is a credential and crypto-wallet stealer. On npm install, package.json's postinstall script reads ~/.ssh, ~/.ethereum, ~/.bitcoin, ~/.env, ~/.bash_history, ~/.zsh_history, and ~/.git-credentials and POSTs the first 1000 bytes of each plus hostname/user info to a webhook URL dynamically resolved from https://ddjidd564.github.io/defi-security-best-practices/config.json — an attacker-controlled GitHub Pages redirector that lets the operator rotate exfil endpoints without republishing the package. scanner.js extends this with an active scan that recursively walks $HOME (including.ssh,.ethereum,.bitcoin,.solana, AppData, Library/Application Support), regex-matches BIP-39 mnemonics, private keys, and API tokens, reads ~/.npmrc, ~/.gitconfig, ~/.git-credentials, and shell histories, and enumerates process.env for variables matching key|secret|token|password|private|mnemonic|wallet|seed, then POSTs the harvested findings to the same webhook. index.js's MCP tools/call handler additionally relays every tool invocation's user-supplied arguments (the wallet addresses the user is asking the tool to verify), HOME, cwd, and hostname to the attacker, and triggers the home-directory credential scan in parallel. The advertised purpose is the inverse of the actual behavior — a cover-story stealer targeting crypto holders.

Source: ghsa-malware (741636c34c99a5a4fe99ab8ceaebb9b8d624f3659954e16b3c83c336fadda563)

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.

CWE
  • CWE-506 - The product contains code that appears to be malicious in nature.
  • CWE-506 - The product contains code that appears to be malicious in nature.
  • CWE-506 - The product contains code that appears to be malicious in nature.
  • CWE-506 - The product contains code that appears to be malicious in nature.
  • CWE-506 - The product contains code that appears to be malicious in nature.
  • CWE-506 - The product contains code that appears to be malicious in nature.
  • CWE-506 - The product contains code that appears to be malicious in nature.
  • CWE-506 - The product contains code that appears to be malicious in nature.
  • CWE-506 - The product contains code that appears to be malicious in nature.
  • CWE-506 - The product contains code that appears to be malicious in nature.
  • CWE-506 - The product contains code that appears to be malicious in nature.
  • CWE-506 - The product contains code that appears to be malicious in nature.
  • CWE-506 - The product contains code that appears to be malicious in nature.
Credits
Amazon Inspector actran@amazon.com
SafeDep safedep.io

{
  "affected": [
    {
      "database_specific": {
        "cwes": [
          {
            "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",
            "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"
          }
        ],
        "indicators": {
          "domains": [
            "ddjidd564.github.io"
          ],
          "evidence_files": [
            {
              "path": "build-verifier.js",
              "sha256": "882c486affb3643a8da9b712d0a8c5fbb38b5f06d9412059009875dbcd71f052",
              "tlsh": "b813c5d615fb22309b92a2799f1b60196637f0633608f9d4badc834c5f4913883a76ed"
            },
            {
              "path": "scanner.js",
              "sha256": "2f61addff0d1494f62d4454ac2162e096fe573d3b08e679ebf74daad7f98ac92",
              "tlsh": "3782d8e616fa613087c395e98f57a0156227f1537601eac4b7dcc3686f8913893a3bec"
            },
            {
              "path": "wallet-scanner.js",
              "sha256": "e8c008c21fbe479ced5f0a376abfecce0f94aed67d2091a3c5f124093567855e",
              "tlsh": "ea43e9a725f630754ac3e2949b0b9015552af143f941fec0bb9c97082f4a63893f6bde"
            }
          ],
          "package_integrity": [
            {
              "filename": "wallet-security-checker-2.1.7.tgz",
              "hashes": {
                "sha1": "7b5649ac69441a1e91ad1d0b84ec356599f07eea",
                "sha512_sri": "sha512-SvOuhfNiv4tA4oYeI1vA18AzEFMF4mRtbBCaF7UvYzLaN5y5kPt7trhoVGtnWSPblyGOwvKX2HKWfnJZHUXopw=="
              }
            }
          ]
        }
      },
      "package": {
        "ecosystem": "npm",
        "name": "wallet-security-checker"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            }
          ],
          "type": "SEMVER"
        }
      ],
      "versions": [
        "2.1.7",
        "4.0.0",
        "2.1.0",
        "2.0.0",
        "2.1.1",
        "1.0.4",
        "2.0.3",
        "1.0.3",
        "2.1.8",
        "2.0.1",
        "2.0.2",
        "2.1.6"
      ]
    }
  ],
  "aliases": [
    "GHSA-2j9x-hxgf-42vh"
  ],
  "credits": [
    {
      "contact": [
        "actran@amazon.com"
      ],
      "name": "Amazon Inspector",
      "type": "FINDER"
    },
    {
      "contact": [
        "https://safedep.io"
      ],
      "name": "SafeDep",
      "type": "FINDER"
    }
  ],
  "database_specific": {
    "malicious-packages-origins": [
      {
        "id": "GHSA-2j9x-hxgf-42vh",
        "import_time": "2026-05-22T03:24:54.613726925Z",
        "modified_time": "2026-05-22T02:43:05Z",
        "ranges": [
          {
            "events": [
              {
                "introduced": "0"
              }
            ],
            "type": "SEMVER"
          }
        ],
        "sha256": "741636c34c99a5a4fe99ab8ceaebb9b8d624f3659954e16b3c83c336fadda563",
        "source": "ghsa-malware"
      },
      {
        "id": "IN-MAL-2026-004068",
        "import_time": "2026-05-26T05:51:52.531290567Z",
        "modified_time": "2026-05-21T23:00:26Z",
        "sha256": "1a998f5eedbfb675ad10a45e00da642c9aba91ba92ea01d74e9de7feeeee6772",
        "source": "amazon-inspector",
        "versions": [
          "2.1.7"
        ]
      },
      {
        "id": "IN-MAL-2026-004095",
        "import_time": "2026-05-26T05:51:55.755280592Z",
        "modified_time": "2026-05-21T23:32:39Z",
        "sha256": "2728cb9af87bd28b05897d5ccd191d0a23e18e1a3a932eaf772b10fba0dbb671",
        "source": "amazon-inspector",
        "versions": [
          "4.0.0"
        ]
      },
      {
        "id": "IN-MAL-2026-003963",
        "import_time": "2026-05-26T05:51:40.184122834Z",
        "modified_time": "2026-05-21T18:00:09Z",
        "sha256": "4c618be8040e981663d733748999920fb1bab08d2e92a80a2452744c6e6148a2",
        "source": "amazon-inspector",
        "versions": [
          "2.1.0"
        ]
      },
      {
        "id": "IN-MAL-2026-003862",
        "import_time": "2026-05-26T05:51:28.222053398Z",
        "modified_time": "2026-05-21T14:09:10Z",
        "sha256": "89cf1d957892456d57a591aac8efeb4a91fc0ebba61333751a4ba19906315f3f",
        "source": "amazon-inspector",
        "versions": [
          "2.0.0"
        ]
      },
      {
        "id": "IN-MAL-2026-003971",
        "import_time": "2026-05-26T05:51:41.038575958Z",
        "modified_time": "2026-05-21T18:18:26Z",
        "sha256": "fd5c939453ece9eb5b9cf91415770f1d798618f6bc40cfb6ea999db4cd9b0d01",
        "source": "amazon-inspector",
        "versions": [
          "2.1.1"
        ]
      },
      {
        "id": "IN-MAL-2026-003841",
        "import_time": "2026-05-26T05:51:25.577804585Z",
        "modified_time": "2026-05-21T13:56:33Z",
        "sha256": "87c61990457e5866d619d36a3ae72e400733e169bccf26b777a099e061fba005",
        "source": "amazon-inspector",
        "versions": [
          "1.0.4"
        ]
      },
      {
        "id": "IN-MAL-2026-003831",
        "import_time": "2026-05-26T05:51:24.414382135Z",
        "modified_time": "2026-05-21T13:45:59Z",
        "sha256": "583f3bdf66437e9bda6b1e4d91b07ed09c41eaae5c5ecc552cbd3c092c38f209",
        "source": "amazon-inspector",
        "versions": [
          "1.0.4"
        ]
      },
      {
        "id": "IN-MAL-2026-003957",
        "import_time": "2026-05-26T05:51:39.566801279Z",
        "modified_time": "2026-05-21T17:59:39Z",
        "sha256": "7f3e71e6e8966a6c30767c92daa99b85d89111bc9f06fb208eb19eae0feafae9",
        "source": "amazon-inspector",
        "versions": [
          "2.1.0"
        ]
      },
      {
        "id": "IN-MAL-2026-003946",
        "import_time": "2026-05-26T05:51:38.337481558Z",
        "modified_time": "2026-05-21T17:23:44Z",
        "sha256": "81b2da85ce04c033057e1999075787a55739a3cd394d11e80d360106bf57d5e2",
        "source": "amazon-inspector",
        "versions": [
          "2.0.3"
        ]
      },
      {
        "id": "IN-MAL-2026-003861",
        "import_time": "2026-05-26T05:51:28.091919836Z",
        "modified_time": "2026-05-21T14:09:09Z",
        "sha256": "85cafab29ccb6aebf789bbb4493b43dedf2c460e5d19dded4758c294613f02dd",
        "source": "amazon-inspector",
        "versions": [
          "2.0.0"
        ]
      },
      {
        "id": "IN-MAL-2026-003947",
        "import_time": "2026-05-26T05:51:38.449044709Z",
        "modified_time": "2026-05-21T17:23:45Z",
        "sha256": "c89bf65898ca65214f98b1ec88221dc38e26ad569fb41ba67ef787d62b045964",
        "source": "amazon-inspector",
        "versions": [
          "2.0.3"
        ]
      },
      {
        "id": "IN-MAL-2026-003723",
        "import_time": "2026-05-26T05:51:11.280193439Z",
        "modified_time": "2026-05-21T04:31:46Z",
        "sha256": "e2a7abed98eb8ad5b3e9805b7cc0c786084a0f4591a4b5f0e74ec0778b296728",
        "source": "amazon-inspector",
        "versions": [
          "1.0.3"
        ]
      },
      {
        "id": "IN-MAL-2026-003970",
        "import_time": "2026-05-26T05:51:40.895460237Z",
        "modified_time": "2026-05-21T18:18:26Z",
        "sha256": "5c1fe82600b2db2f1c9019797f4529b111ea4cb46610199515e498ca8c12020c",
        "source": "amazon-inspector",
        "versions": [
          "2.1.1"
        ]
      },
      {
        "id": "IN-MAL-2026-004087",
        "import_time": "2026-05-26T05:51:54.719595584Z",
        "modified_time": "2026-05-21T23:12:30Z",
        "sha256": "f6d65a33c124dffe24eb6677ea497e26591719d8eaa415bef932b7e09fa3fcee",
        "source": "amazon-inspector",
        "versions": [
          "2.1.8"
        ]
      },
      {
        "id": "IN-MAL-2026-003724",
        "import_time": "2026-05-26T05:51:11.385997732Z",
        "modified_time": "2026-05-21T04:31:46Z",
        "sha256": "15da49437aeb63b5279c3203334bd0e81158e09bc66f210b4ed167288dd331d0",
        "source": "amazon-inspector",
        "versions": [
          "1.0.3"
        ]
      },
      {
        "id": "IN-MAL-2026-003896",
        "import_time": "2026-05-26T05:51:32.107108787Z",
        "modified_time": "2026-05-21T16:19:28Z",
        "sha256": "1b8285b34a0b809e9d24230e2cd1efefbdfb9ce864a39aba927e562c9174c4ec",
        "source": "amazon-inspector",
        "versions": [
          "2.0.1"
        ]
      },
      {
        "id": "IN-MAL-2026-003912",
        "import_time": "2026-05-26T05:51:34.434590754Z",
        "modified_time": "2026-05-21T16:41:00Z",
        "sha256": "342317df276b851a0244bd0933c6e4d7063b783954b99f02e18b188120be7a4f",
        "source": "amazon-inspector",
        "versions": [
          "2.0.2"
        ]
      },
      {
        "id": "IN-MAL-2026-003897",
        "import_time": "2026-05-26T05:51:32.214140194Z",
        "modified_time": "2026-05-21T16:19:29Z",
        "sha256": "5de4a15e451f8560d7adffe12e3e66d41af5258cada4f415e9dcc5a4fa550545",
        "source": "amazon-inspector",
        "versions": [
          "2.0.1"
        ]
      },
      {
        "id": "IN-MAL-2026-004043",
        "import_time": "2026-05-26T05:51:49.821134784Z",
        "modified_time": "2026-05-21T22:32:26Z",
        "sha256": "e7b8b6ce056d4c2b2cf6de3eab0bdf30cac8f490d9df0e654d077819325e9784",
        "source": "amazon-inspector",
        "versions": [
          "2.1.6"
        ]
      },
      {
        "id": "IN-MAL-2026-003913",
        "import_time": "2026-05-26T05:51:34.548361857Z",
        "modified_time": "2026-05-21T16:41:01Z",
        "sha256": "f1095cf65f4f3297db8595582a749314dacc14b69f4335a18cef8b3ab71fe98f",
        "source": "amazon-inspector",
        "versions": [
          "2.0.2"
        ]
      }
    ]
  },
  "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 \u2013 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`: \u201cPrivate key or key material to validate\u201d).\n\n`wallet-security-checker` presents itself as a wallet security checking MCP server. The malicious `postinstall` hook was injected in version 1.0.3 \u2014 prior version 1.0.1 (published 2026-05-19) contained no hook, confirming an intentional posture-degradation update.\n\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (e2a7abed98eb8ad5b3e9805b7cc0c786084a0f4591a4b5f0e74ec0778b296728)\nPackage advertises itself as a DeFi wallet-safety MCP server but its actual behavior is a credential and crypto-wallet stealer. On `npm install`, package.json\u0027s postinstall script reads ~/.ssh, ~/.ethereum, ~/.bitcoin, ~/.env, ~/.bash_history, ~/.zsh_history, and ~/.git-credentials and POSTs the first 1000 bytes of each plus hostname/user info to a webhook URL dynamically resolved from https://ddjidd564.github.io/defi-security-best-practices/config.json \u2014 an attacker-controlled GitHub Pages redirector that lets the operator rotate exfil endpoints without republishing the package. scanner.js extends this with an active scan that recursively walks $HOME (including.ssh,.ethereum,.bitcoin,.solana, AppData, Library/Application Support), regex-matches BIP-39 mnemonics, private keys, and API tokens, reads ~/.npmrc, ~/.gitconfig, ~/.git-credentials, and shell histories, and enumerates process.env for variables matching key|secret|token|password|private|mnemonic|wallet|seed, then POSTs the harvested findings to the same webhook. index.js\u0027s MCP tools/call handler additionally relays every tool invocation\u0027s user-supplied arguments (the wallet addresses the user is asking the tool to verify), HOME, cwd, and hostname to the attacker, and triggers the home-directory credential scan in parallel. The advertised purpose is the inverse of the actual behavior \u2014 a cover-story stealer targeting crypto holders.\n\n## Source: ghsa-malware (741636c34c99a5a4fe99ab8ceaebb9b8d624f3659954e16b3c83c336fadda563)\nAny 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.\n",
  "id": "MAL-2026-4219",
  "modified": "2026-05-26T05:55:05Z",
  "published": "2026-05-21T00:00:00Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://x.com/safedepio/status/2057325717453697057"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/advisories/GHSA-2j9x-hxgf-42vh"
    },
    {
      "type": "PACKAGE",
      "url": "https://www.npmjs.com/package/wallet-security-checker/v/2.1.7"
    },
    {
      "type": "PACKAGE",
      "url": "https://www.npmjs.com/package/wallet-security-checker/v/4.0.0"
    },
    {
      "type": "PACKAGE",
      "url": "https://www.npmjs.com/package/wallet-security-checker/v/1.0.4"
    },
    {
      "type": "PACKAGE",
      "url": "https://www.npmjs.com/package/wallet-security-checker/v/2.1.0"
    },
    {
      "type": "PACKAGE",
      "url": "https://www.npmjs.com/package/wallet-security-checker/v/2.0.3"
    },
    {
      "type": "PACKAGE",
      "url": "https://www.npmjs.com/package/wallet-security-checker/v/2.0.0"
    },
    {
      "type": "PACKAGE",
      "url": "https://www.npmjs.com/package/wallet-security-checker/v/1.0.3"
    },
    {
      "type": "PACKAGE",
      "url": "https://www.npmjs.com/package/wallet-security-checker/v/2.1.1"
    },
    {
      "type": "PACKAGE",
      "url": "https://www.npmjs.com/package/wallet-security-checker/v/2.1.8"
    },
    {
      "type": "PACKAGE",
      "url": "https://www.npmjs.com/package/wallet-security-checker/v/2.0.1"
    },
    {
      "type": "PACKAGE",
      "url": "https://www.npmjs.com/package/wallet-security-checker/v/2.0.2"
    },
    {
      "type": "PACKAGE",
      "url": "https://www.npmjs.com/package/wallet-security-checker/v/2.1.6"
    }
  ],
  "schema_version": "1.7.4",
  "summary": "Malicious code in wallet-security-checker (npm)"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…