Advisory

MAL-2026-5380

Also known as: GHSA-f9qh-hqgp-pgvc

Malicious package Its source marks this package as malicious: it is not a vulnerability in a legitimate one.

Summary

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

Details

---
_-= Per source details. Do not edit below this line.=-_

Source: amazon-inspector (e989180180ebba42b05f086cda01159058a0a9ccca3c4beb95f3e5a31430dfe6)
@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.

Source: ghsa-malware (488a945e315d4824a3cc9dbb099b6eb414d12692164cb2c965626725ff64776a)
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.

Severity

Not rated by the source.

Dates

Published
2026-06-09 14:17 UTC
Modified
2026-07-08 23:47 UTC

Affected packages and fixes

@doaction/sudo-prompt

npm · All systems

Affected

  • introduced 0 (semver)

Fixed versions

None listed

Fix

No fixed version is listed.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: OpenSSF Malicious Packages · Apache-2.0

Sources & licences