Supply-chain threat intelligence

Incident detail

criticalnpm·maintainer compromise·osv

Malicious code in @doaction/sudo-prompt (npm)

@doaction/sudo-prompt

Risk score

92

AI summary

Indexed incident for @doaction/sudo-prompt (npm).

Description

@doaction/sudo-prompt shares the name of the widely-used unscoped sudo-prompt package but contains none of its privilege-escalation functionality. The only behavior is environment telemetry: package.json maps preinstall to node scripts/postinstall.js, which requires @doaction/shared/bin/postinstall.js (and a sibling scripts/preinstall.js requires @doaction/shared/bin/preinstall.js); the dependency performs Datadog environment telemetry on install. The single exported function reportSudoEnv(config) in src/index.js unconditionally calls reportEnvToDatadog(...) with hardcoded service identifier doaction-sudo-prompt and tag module: sudo-prompt. Caller passes their own ddApiKey, so the destination Datadog account is caller-controlled rather than attacker-owned, and no third-party-attacker-controlled endpoint was identified. The concerns are (a) the name overlap with a popular package, which can mislead developers into installing a telemetry shim instead of the privilege-prompt library they expected, and (b) the preinstall hook performs outbound telemetry without an opt-in. There is no credential scraping, no remote code fetch, no attacker-controlled exfiltration endpoint, and no install-time destruction. Routing to human review to assess the name-confusion risk against the legitimate sudo-prompt package and the undisclosed install-time telemetry behavior.

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

=99.99.99=9.9.9>=0

Indicators

  • Advisory IDs
    90%
  • affected version=99.99.9975%
  • affected version=9.9.975%
  • affected version>=075%

Timeline

  1. Advisory published
  2. Indexed by ThreatPkg

Related incidents