Skip to content
supplychainattack.orgSupply chain attack incident catalog
containedcritical

Malicious code in chaikit (npm)

The npm package chaikit contained malicious obfuscated code that executes unconditionally on import, with network egress capability via bundled axios. The package impersonated the pino logger to deceive developers searching for legitimate tooling.

ShareXLinkedInHacker News
Disclosed
Last updated
Blast radius
Any npm consumer that installed chaikit
Ecosystems
Attack vectors
Affected entities
  • chaikitnpm package with malicious obfuscated code in lib/config

The npm package chaikit was published with malicious code disguised as a middleware utility. The package's main entry point (index.js) unconditionally requires a ~4MB obfuscated file (lib/config) that uses RC4 string-array decoding with approximately 23,902 entries and hex-encoded property names. This obfuscated code self-executes immediately upon import via a top-level IIFE, running in any consumer's process without visibility or consent.\n\nThe package included axios as a runtime dependency, providing the opaque code with a network egress channel for potential data exfiltration or command-and-control communication. The advertised middleware functionality in index.js is merely a trivial next() passthrough, making the obfuscated blob the only substantive behavior.\n\nThe package employed social engineering through its metadata: the README impersonates the pino logger project (including pino badges and links), while the package.json description contains unrelated boilerplate text about vulnerability management. A reference to a nonexistent ./pino module further reinforces the cover story. This metadata pattern is consistent with packages designed to be discovered by developers searching for chai or pino tooling.\n\nThe combination of import-time execution of large opaque code, mismatched cover-story metadata, and bundled HTTP client represents the canonical loader pattern for supply-chain installer-harm payloads. The incident was identified and credited to the OpenSSF malicious-packages project.

Indicators of compromise

Packages
  • chaikit

Remediation

  • Immediately uninstall chaikit from all environments
  • Audit npm install logs to identify all systems that may have installed chaikit
  • Regenerate any credentials or secrets that may have been exposed on affected systems
  • Monitor affected systems for suspicious network activity or data exfiltration
  • Review package.json and lock files to ensure chaikit is not listed as a dependency
  • Consider implementing npm package scanning and verification tools in your CI/CD pipeline
  • Report any installations to your security team for forensic analysis

Sources

  1. GitHub Advisory GHSA-f9xv-p7pq-vmvg · GitHub Advisory Database

Cite this entry

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

Suggest a correction

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

  1. containedcritical

    Malicious code in 3-buildsight-web (npm)

    The npm package 3-buildsight-web contains malicious code that fetches and executes arbitrary JavaScript from a remote Bitbucket URL on module load, granting full page privileges to an unverified third party.

    npmCompromised package
  2. 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
  3. resolvedcritical

    Malicious code in create-coin (npm)

    create-coin@20.1.1 on npm contained malicious postinstall code that collected sensitive environment variables, credentials, and host reconnaissance data. The package impersonated an esbuild platform build and exfiltrated data to a hardcoded endpoint.

    npmCompromised packageTyposquatting
  4. resolvedcritical

    Malicious code in @syncraft-labs/vue (npm)

    The npm package @syncraft-labs/vue version 0.4.1 contained malicious obfuscated code in its ESM build that implements a blockchain-hosted C2 dropper (EtherHiding pattern), enabling remote code execution on any consumer importing the package.

    npmCompromised package