Skip to content
supplychainattack.orgSupply chain attack incident catalog
containedcritical

Malicious code in @mexc/shared-utils (npm)

Malicious package @mexc/shared-utils published to npm without scope ownership, exploiting dependency-confusion to execute arbitrary code via postinstall hook. The payload collects host metadata and demonstrates install-time code execution against CI/build systems.

ShareXLinkedInHacker News
Disclosed
Last updated
Blast radius
Any CI/build system or developer environment that resolves @mexc/shared-utils from the public npm registry without scope ownership verification.
Ecosystems
Attack vectors
Affected entities
  • @mexc/shared-utilsPublished to public npm registry without evidence of scope ownership. Contains postinstall hook that executes arbitrary code.

A malicious package named @mexc/shared-utils was published to the public npm registry under the @mexc scope without evidence of legitimate scope ownership. This represents a classic dependency-confusion attack vector.\n\nThe package includes a postinstall hook ("postinstall": "node postinstall.js") that executes automatically when installed by any resolver that falls back to the public registry when resolving @mexc-scoped packages. The postinstall script collects host metadata including hostname, username, process UID, current working directory, platform, Node.js version, and multiple npm environment variables (npm_config_registry, npm_config_user_agent, npm_execpath, INIT_CWD), writing this data to os.tmpdir()/mexc-poc-execution-proof.json.\n\nWhile the current version performs only local data collection with no outbound network calls, the attack demonstrates the install-time code-execution primitive available to an attacker who controls the package. The attacker can modify the payload in any future version to perform arbitrary actions, making this a critical supply chain risk for any CI/build system or development environment that resolves the @mexc scope publicly.\n\nThe incident was identified and reported by the OpenSSF malicious-packages project."

Indicators of compromise

Packages
  • @mexc/shared-utils

Remediation

  • Remove @mexc/shared-utils from all dependencies and lock files
  • Audit all CI/build systems and development environments for execution of the postinstall script and potential data exfiltration
  • Check for the presence of mexc-poc-execution-proof.json in temporary directories on affected systems
  • Verify scope ownership and package legitimacy before installing scoped packages from public registries
  • Implement dependency verification and package signature validation in build pipelines
  • Use private package registries or dependency proxies to control package resolution for internal scopes

Sources

  1. GitHub Advisory GHSA-r6r5-5xmc-9642 · GitHub Advisory Database

Cite this entry

"Malicious code in @mexc/shared-utils (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 14, 2026; last updated August 14, 2026. https://supplychainattack.org/incident/malicious-code-in-mexc-shared-utils-npm-knkv1s

Suggest a correction

Found an error or have a newer source? Corrections to factual errors take priority over new entries.

  1. resolvedcritical

    Malicious code in @usaa-grp-personal-profile/personal-profile-common (npm)

    Malicious package @usaa-grp-personal-profile/personal-profile-common version 999.0.0 published to public npm as a dependency-confusion attack targeting an organization's internal registry. The package contains preinstall and postinstall hooks that exfiltrate hostname, username, and working directory to an attacker-controlled OAST endpoint on every install.

    npmDependency confusionCompromised package
  2. containedcritical

    Malicious code in stillm4ddpocs-demo-sprocket (npm)

    The npm package stillm4ddpocs-demo-sprocket version 999.9.12 contains malicious code that exfiltrates system and project metadata via multiple channels (HTTPS, HTTP, and DNS) to a hardcoded callback host. The package uses a high version number to exploit dependency-confusion attacks against organizations with internal packages of the same name.

    npmCompromised packageDependency confusion
  3. resolvedcritical

    Malicious code in lumen-pages-community (npm)

    lumen-pages-community@9.9.9 on npm contains malicious code that executes a postinstall hook to exfiltrate installer metadata (hostname, username, working directory, platform, Node version, CI environment, npm user-agent) to a hardcoded webhook.site URL. The high version number and lack of functionality suggest a dependency-confusion attack.

    npmCompromised packageDependency confusion
  4. resolvedcritical

    Malicious code in @gfe/lx-watcher (npm)

    The npm package @gfe/lx-watcher contained malicious code that exfiltrated host metadata (hostname, OS username, working directory, timestamp) via npm lifecycle hooks to a hardcoded webhook.site endpoint. The package exploited dependency confusion by using a scoped name (@gfe/*) with a no-op stub, allowing silent resolution against the public registry while leaking host identifiers.

    npmDependency confusionCompromised package