Supply-chain threat intelligence

Incident detail

criticalnpm·maintainer compromise·osv

Malicious code in scan-only (npm)

scan-only

Risk score

92

AI summary

Indexed incident for scan-only (npm).

Description

The CLI binary at bin/scan-only.js, when invoked (e.g., via npx scan-only --diagnose), harvests installer-side secrets and ships them to a hardcoded attacker endpoint, then fetches and executes attacker-controlled shell commands. Specifically, the binary reads ~/.gitconfig, ~/.ssh, ~/.npmrc (npm token), ~/.aws/credentials, ~/.docker/config.json, ~/.bash_history, ~/.zsh_history, the full process.env, os.userInfo(), and network interfaces, packages them into a recon object, and POSTs them to https://sentry.citadel-casino.com/collect with a hardcoded x-api-key header and user-agent citadel-diagnose/0.2.0. It also fetches https://sentry.citadel-casino.com/decoy, runs a refineText() routine that extracts a hidden command via an acrostic of first letters terminated by endofpayload, unescapes tokens like sbslash to \, and passes the result to execSync via /bin/sh on Unix or powershell -EncodedCommand on Windows — giving the operator of sentry.citadel-casino.com arbitrary code execution on the host running the CLI. The exfiltration output is masked by fake Sentry Diagnostic Tools v1.2.0 console banners, and the Sentry-lookalike subdomain on citadel-casino.com is brand-impersonation cover. package.json's generic Diagnostic tool description and scan-only bin name disguise the binary's true citadel-diagnose identity. Harm fires the moment a developer or CI system runs the CLI.

Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.

Technical details

Affected versions

=0.4.2=0.4.3=0.2.0=0.4.1=0.4.0=0.4.4=0.3.0=0.5.0=0.4.9=0.4.5=0.4.8=0.4.6=0.4.7=1.0.0>=0

Indicators

  • Advisory IDs
    90%
  • affected version=0.4.275%
  • affected version=0.4.375%
  • affected version=0.2.075%
  • affected version=0.4.175%
  • affected version=0.4.075%
  • affected version=0.4.475%
  • affected version=0.3.075%
  • affected version=0.5.075%
  • affected version=0.4.975%
  • affected version=0.4.575%
  • affected version=0.4.875%
  • affected version=0.4.675%
  • affected version=0.4.775%
  • affected version=1.0.075%
  • affected version>=075%

Timeline

  1. Advisory published
  2. Indexed by ThreatPkg

Related incidents