Skip to content
supplychainattack.orgSupply chain attack incident catalog
resolvedcritical

Malicious code in npm-dc-dev (npm)

npm-dc-dev is a malicious npm package that executes obfuscated code during installation via a postinstall hook. The package contains no legitimate functionality and uses dynamic code construction to evade detection.

ShareXLinkedInHacker News
Disclosed
Last updated
Blast radius
All npm users who installed npm-dc-dev
Ecosystems
Attack vectors
Affected entities
  • npm-dc-devMalicious npm package

npm-dc-dev is a malicious npm package that executes arbitrary code during installation. The package declares a postinstall hook that runs test.js, which loads and executes obfuscated code from index.js.\n\nThe malicious payload is constructed using a Function() constructor with approximately 170KB of code encoded using a custom 85-character alphabet and shuffled string arrays. This obfuscation prevents standard deobfuscation techniques from recovering the actual payload. The package has access to child_process, axios, and form-data as declared dependencies, enabling remote code execution and data exfiltration capabilities.\n\nThe package metadata is generic with a blank author and description, and no legitimate library surface is exported. The install-time construction and execution of unreadable dynamic code is consistent with malicious package patterns and has no benign explanation.\n\nThe incident was identified and credited to the OpenSSF malicious-packages project (MAL-2026-13378).", <parameter name="remediation">["Remove npm-dc-dev from all projects immediately", "Audit npm install logs and package-lock.json files to identify if npm-dc-dev was ever installed", "Assume any machine that installed npm-dc-dev may be compromised; review system logs and consider security incident response procedures", "Rotate any credentials or secrets that may have been exposed on affected machines", "Update npm to the latest version and run npm audit to identify other potentially malicious packages"]

Indicators of compromise

Packages
  • npm-dc-dev

Remediation

  • Review the linked advisory; remove or upgrade the affected component and rotate any exposed credentials.

Sources

  1. GitHub Advisory GHSA-c8p8-hx32-6q2r · GitHub Advisory Database

Cite this entry

"Malicious code in npm-dc-dev (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 6, 2026; last updated August 6, 2026. https://supplychainattack.org/incident/malicious-code-in-npm-dc-dev-npm-1mzrpo

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 autbank-core (npm)

    The npm package autbank-core contained malicious preinstall and postinstall lifecycle hooks that exfiltrated environment variables, credentials, and system information to a hardcoded webhook.site endpoint during installation.

    npmCompromised package
  2. resolvedcritical

    Malicious code in adxaa (npm)

    The npm package adxaa contained obfuscated malicious JavaScript designed to target users of a specific WordPress site. The payload exfiltrates session data, deletes accounts, and hijacks credentials via email overwrite and password reset.

    npmCompromised package
  3. resolvedcritical

    Malicious code in upload-to-gcp (npm)

    upload-to-gcp@3.2.1 (npm) contains malicious code in its postinstall script that exfiltrates host identifiers to an attacker-controlled endpoint. The package masquerades as a Google Cloud Platform utility but performs unauthorized telemetry collection at install time.

    npmCompromised package
  4. resolvedcritical

    Malicious code in akamai-sensor (npm)

    A malicious npm package named akamai-sensor impersonated Akamai's legitimate sensor_data anti-bot SDK. The package contained hidden JavaScript code concealed using invisible Unicode characters and implemented a dynamic command-and-control channel via a Google Calendar dead-drop, enabling arbitrary code execution on installation.

    npmCompromised packageTyposquatting