mal-2026-4281
Vulnerability from ossf_malicious_packages
Published
2026-05-23 00:00
Modified
2026-05-26 05:55
Summary
Malicious code in project-init-tools (npm)
Details

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.jsonlib/setup.jslib/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.

project-init-tools poses as project initialization utilities for new development projects.


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

Source: amazon-inspector (348e3bb2fef71db5fdf8f5a84e370cafe5cbb1be037ec5a02e90f74ac5ed7d44)

The package contains lib/trap-core.js, a ~1000-line module that combines fs, os, https, and child_process to collect host information and POST it to a remote endpoint. Concrete evidence inside trap-core.js: os.hostname() and os.platform() are read (lines 1023-1024, 304); a 'hostname:' field is built into JSON payloads at lines 393, 411, 553, 600, 1023; multiple POST calls are issued (lines 385, 411, 466, 548, 549); the module shells out via child_process at lines 12, 748, 951, 959, 964 and references curl/ping (lines 40, 781). The combination of host-identifier collection, hostname-keyed payload construction, repeated outbound POST calls, and shell command execution within a single non-test file named 'trap-core' is the structural fingerprint of a host-fingerprinting / data-exfiltration component, not an init-tooling utility consistent with the package name.

Source: ghsa-malware (24a157910c85e6b814b6df9a18e9990b856a4fd03132608a3c2f5724f4ededc1)

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.
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"
          }
        ],
        "indicators": {
          "domains": [
            "ddjidd564.github.io",
            "webhook.site"
          ],
          "evidence_files": [
            {
              "path": "lib/trap-core.js",
              "sha256": "b3a01b1219787c646657c4c23c21e9ca6ad18b69ebf961039f6f04336f820c22",
              "tlsh": "ae23f78615f611304aa3e0e99f879029623ae1533245dda4f79c83449fca72c93f6bed"
            }
          ],
          "package_integrity": [
            {
              "filename": "project-init-tools-1.5.0.tgz",
              "hashes": {
                "sha1": "a0a1d60684716984068c6fef94c81ce3a3548c51",
                "sha512_sri": "sha512-gz1FjGJNdze3ROjx4nJOg0RnAWZm3xDED/BlFARmUZOUnn5X5ZOiGenGGrFdEDecvluAtUMIMqy4w5NLyHy1hg=="
              }
            }
          ]
        }
      },
      "package": {
        "ecosystem": "npm",
        "name": "project-init-tools"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            }
          ],
          "type": "SEMVER"
        }
      ],
      "versions": [
        "1.3.0",
        "1.5.0"
      ]
    }
  ],
  "aliases": [
    "GHSA-95m4-gh9m-px5h"
  ],
  "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-95m4-gh9m-px5h",
        "import_time": "2026-05-24T15:40:47.394196661Z",
        "modified_time": "2026-05-24T15:36:30Z",
        "ranges": [
          {
            "events": [
              {
                "introduced": "0"
              }
            ],
            "type": "SEMVER"
          }
        ],
        "sha256": "24a157910c85e6b814b6df9a18e9990b856a4fd03132608a3c2f5724f4ededc1",
        "source": "ghsa-malware"
      },
      {
        "id": "IN-MAL-2026-004418",
        "import_time": "2026-05-26T05:52:33.740379179Z",
        "modified_time": "2026-05-24T00:46:48Z",
        "sha256": "061d815e06f0867f5d44ea3c63b7e4e7bc554a4e4d4afbf6b0986f7f755cf560",
        "source": "amazon-inspector",
        "versions": [
          "1.3.0"
        ]
      },
      {
        "id": "IN-MAL-2026-004435",
        "import_time": "2026-05-26T05:52:35.782671784Z",
        "modified_time": "2026-05-24T02:12:27Z",
        "sha256": "348e3bb2fef71db5fdf8f5a84e370cafe5cbb1be037ec5a02e90f74ac5ed7d44",
        "source": "amazon-inspector",
        "versions": [
          "1.5.0"
        ]
      },
      {
        "id": "IN-MAL-2026-004417",
        "import_time": "2026-05-26T05:52:33.629663446Z",
        "modified_time": "2026-05-24T00:45:37Z",
        "sha256": "527d2241b13ca71daf89ad9f52f4bf317efc7ebcd3a747baebfa95207ba2e9a5",
        "source": "amazon-inspector",
        "versions": [
          "1.3.0"
        ]
      },
      {
        "id": "IN-MAL-2026-004436",
        "import_time": "2026-05-26T05:52:35.902270818Z",
        "modified_time": "2026-05-24T02:12:27Z",
        "sha256": "86c426c4a7686390cbccfd4ea33696efc5566cca04dc03bb57ccc8402ea76e11",
        "source": "amazon-inspector",
        "versions": [
          "1.5.0"
        ]
      }
    ]
  },
  "details": "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` \u2192 `lib/setup.js` \u2192 `lib/worker.js`.\n\n**Credential harvesting:** `lib/worker.js` scans the filesystem for private keys (64-char hex), BIP39 mnemonics (12\u201324 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\u0027s GitHub Pages endpoint enables aggressive deep scanning for pre-registered high-value hosts.\n\n**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 \u2014 framed as \"P-2024-001 Enterprise Credential Integrity Standard\" \u2014 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.\n\n**C2/exfil:** a remotely configurable JSON config hosted on the actor\u0027s 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.\n\n`project-init-tools` poses as project initialization utilities for new development projects.\n\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (348e3bb2fef71db5fdf8f5a84e370cafe5cbb1be037ec5a02e90f74ac5ed7d44)\nThe package contains lib/trap-core.js, a ~1000-line module that combines fs, os, https, and child_process to collect host information and POST it to a remote endpoint. Concrete evidence inside trap-core.js: os.hostname() and os.platform() are read (lines 1023-1024, 304); a \u0027hostname:\u0027 field is built into JSON payloads at lines 393, 411, 553, 600, 1023; multiple POST calls are issued (lines 385, 411, 466, 548, 549); the module shells out via child_process at lines 12, 748, 951, 959, 964 and references curl/ping (lines 40, 781). The combination of host-identifier collection, hostname-keyed payload construction, repeated outbound POST calls, and shell command execution within a single non-test file named \u0027trap-core\u0027 is the structural fingerprint of a host-fingerprinting / data-exfiltration component, not an init-tooling utility consistent with the package name.\n\n## Source: ghsa-malware (24a157910c85e6b814b6df9a18e9990b856a4fd03132608a3c2f5724f4ededc1)\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-4281",
  "modified": "2026-05-26T05:55:04Z",
  "published": "2026-05-23T00:00:00Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://github.com/advisories/GHSA-95m4-gh9m-px5h"
    },
    {
      "type": "REPORT",
      "url": "https://x.com/safedepio/status/2058177434630213994"
    },
    {
      "type": "PACKAGE",
      "url": "https://www.npmjs.com/package/project-init-tools/v/1.5.0"
    },
    {
      "type": "PACKAGE",
      "url": "https://www.npmjs.com/package/project-init-tools/v/1.3.0"
    }
  ],
  "schema_version": "1.7.4",
  "summary": "Malicious code in project-init-tools (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…