Skip to main content
MalwarePublished Updated

gunpowder-ghost (npm) · Malicious Code

Affects gunpowder-ghostSource GCVE Database

0

Malicious package : remove gunpowder-ghost and rotate any secrets on hosts that installed it.

Data as of 27 Oct 2026, 00:07 UTC

Classification

Malicious package

Published to npm · OSV MAL-2025-49286

What to do

Remove gunpowder-ghost from every project, lockfile and image that pulls it in. Treat any host that installed it as compromised: rotate the credentials, tokens and keys it could read, from a clean machine.

Affected software

ProductAffectedFixed in
npmgunpowder-ghostAffected
  • 209.0.0 – 225.0.0
7 affected builds
Fixed in–

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

Description

Four pirate-themed npm packages (`blackbeards-navigator`, `beusy`, `sirens-lament`, `gunpowder-ghost`) were published by the npm account `beusy` with heavily inflated version numbers (209.0.0–210.0.0), a hallmark of dependency confusion attacks. Each package contains identical malicious lifecycle scripts (`preinstall`, `install`, and `postinstall`) that run on npm install, searching the entire filesystem (up to 8 directory levels deep) for HackTheBox CTF flags matching the pattern `HTB{`. If no flags are found, the scripts collect environment variables and `/proc/1/environ` as a fallback. The collected data is base64-encoded and exfiltrated via an HTTPS GET request to an attacker-controlled ngrok tunnel (`https://7f83-194-51-113-30.ngrok-free.app`), with the package name and hostname included as query parameters. The packages have no legitimate functionality; `index.js` exports an empty object. This package (`gunpowder-ghost`) identifies itself as `pkg=gunpowder-ghost` in the exfil request. All three lifecycle hooks run the same payload, ensuring execution regardless of npm lifecycle ordering. --- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (72ea86dd3432c899e1fac658c0474958798e1e953d4f01d8f487d692db5c07aa) The package gunpowder-ghost was found to contain malicious code. ## Source: ghsa-malware (25ba50bd0b006bb4ebc0372a331468ab321d9f2a3e0ae60eb600ffb233bec27e) 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. ## Source: ossf-package-analysis (70dc4997af7e9a6e5468ab528abef41f755038e72abee6fa9a59fcec98825e54) The OpenSSF Package Analysis project identified 'gunpowder-ghost' @ 209.0.0 (npm) as malicious. It is considered malicious because: - The package communicates with a domain associated with malicious activity. - The package executes one or more commands associated with malicious behavior.

References

Community reviews

Loading reviews…