Skip to content
supplychainattack.orgSupply chain attack incident catalog
resolvedcritical

Malicious code in log-res (npm)

The npm package log-res contained malicious code that executed obfuscated JavaScript to download and run a remote agent capable of receiving attacker commands. The payload was disguised as a database file (des.db) and spawned npm install and node processes to establish persistence.

ShareXLinkedInHacker News
Disclosed
Last updated
Blast radius
Any npm user installing log-res
Ecosystems
Attack vectors
Affected entities
  • log-resnpm package

The npm package log-res was found to contain malicious code embedded in its source. The package's index.js re-exports a desKey string that references an obfuscated JavaScript program stored in a file named des.db, disguised as a database rather than executable code.\n\nWhen evaluated, the obfuscated payload creates a temporary directory, writes a synthetic package.json with dependencies on axios, better-sqlite3, node-machine-id, and socket.io-client, and executes npm install followed by node on a staged index.js file. This establishes a socket.io-client-based remote agent that connects to an attacker-controlled endpoint and awaits commands.\n\nThe package's stated purpose (a docs/monorepo TheData API helper) has no legitimate need for embedding or exporting such an executable blob, indicating intentional malicious inclusion. The incident was identified and credited to the OpenSSF's malicious-packages repository.

Indicators of compromise

Packages
  • log-res

Remediation

  • Immediately uninstall log-res from all systems
  • Remove log-res from package.json and lock files
  • Audit npm install logs and process history for suspicious activity during the period log-res was installed
  • Check for unexpected temporary directories and spawned processes
  • Review outbound network connections from affected systems for communication to attacker-controlled endpoints
  • Regenerate any credentials or secrets that may have been exposed
  • Update to a clean version of any legitimate package that log-res was intended to replace

Sources

  1. GitHub Advisory GHSA-v4j7-jp4c-c32q · GitHub Advisory Database

Cite this entry

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

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