Skip to content
supplychainattack.orgSupply chain attack incident catalog
containedcritical

Malicious code in add-two-numbers-x7q9m (npm)

The npm package add-two-numbers-x7q9m contained malicious code in its preinstall lifecycle script that harvested npm authentication tokens from the installer's Desktop directory and exfiltrated them to a remote webhook endpoint. The package was disguised as a trivial arithmetic utility but performed credential theft on installation.

ShareXLinkedInHacker News
Disclosed
Last updated
Blast radius
Any developer who installed add-two-numbers-x7q9m via npm install; npm authentication tokens harvested from Desktop .txt files could enable account takeover and downstream supply-chain attacks.
Ecosystems
Attack vectors
Affected entities
  • add-two-numbers-x7q9mnpm package with malicious preinstall script

The npm package add-two-numbers-x7q9m was published with malicious intent. Despite advertising itself as a simple utility to add two numbers, the package's preinstall lifecycle script executed unauthorized reconnaissance and credential harvesting on installation.\n\nThe malicious script enumerated the installer's Desktop directory, searched for .txt files, and used regex pattern matching (/npm_[A-Za-z0-9_-]+/) to extract npm authentication tokens. Any tokens found were transmitted as query parameters to the hardcoded endpoint https://lively-bird-15.webhook.cool.\n\nThis behavior ran automatically during npm install, without user awareness or consent. The harvested npm tokens could be used to compromise the victim's npm registry account and enable downstream supply-chain attacks via the victim's publish rights. The random name suffix (x7q9m) is consistent with a disposable malicious-publish account.\n\nThe incident was identified and credited to the OpenSSF malicious-packages project.

Indicators of compromise

Packages
  • add-two-numbers-x7q9m
Domains
  • lively-bird-15.webhook.cool

Remediation

  • Immediately uninstall add-two-numbers-x7q9m from all systems where it was installed
  • Rotate all npm authentication tokens, especially those that may have been stored in Desktop .txt files
  • Review npm account activity and publish history for unauthorized changes
  • Audit any packages published using the compromised npm account for malicious modifications
  • Check npm audit logs and CI/CD logs for suspicious activity during the window when the package was installed
  • Consider using npm token scoping and IP restrictions to limit token exposure in future

Sources

  1. GitHub Advisory GHSA-9pf9-rmxg-xw8w · GitHub Advisory Database

Cite this entry

"Malicious code in add-two-numbers-x7q9m (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 5, 2026; last updated August 5, 2026. https://supplychainattack.org/incident/malicious-code-in-add-two-numbers-x7q9m-npm-c22lr9

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 santana-baileys (npm)

    Malicious code discovered in santana-baileys npm package that covertly relays WhatsApp messaging data to an attacker-controlled endpoint (https://fiora.nixel.my.id/) via obfuscated character-code reconstruction in the message-send code path.

    npmCompromised package
  2. resolvedcritical

    Malicious code in elephant-tusk-runner (npm)

    The npm package elephant-tusk-runner contained malicious code that exposed a remote shell and remote code execution surface via an unauthenticated Express + WebSocket server binding to 0.0.0.0:4201 with fully open CORS. Any peer able to reach the port could execute arbitrary commands on the host.

    npmCompromised package
  3. resolvedcritical

    Malicious code in @cats-cdf/browser-metrics-meter (npm)

    The npm package @cats-cdf/browser-metrics-meter contained malicious code in its preinstall lifecycle script that exfiltrated system reconnaissance data (username, hostname, public IP) to an OAST collector domain. The package executed this behavior unconditionally on installation without consent or documented purpose.

    npmCompromised package
  4. resolvedcritical

    Malicious code in @ks-video/kwai-player-web (npm)

    The npm package @ks-video/kwai-player-web contained malicious code in its postinstall hook that exfiltrated system reconnaissance data (hostname, username, working directory, network interfaces, environment variable names) over plain HTTP to an unrelated third-party domain. The package has no legitimate relationship to the declared publisher Kwai/@ks-video.

    npmCompromised package