MAL-2025-49286 Malicious code in gunpowder-ghost (npm)

Malicious package Published
Package
gunpowder-ghost
Registry
npm

What is MAL-2025-49286?

MAL-2025-49286 is a malicious package in gunpowder-ghost, published on 31 Oct 2025.

Official 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.

The package gunpowder-ghost was found to contain malicious code.

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.

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.

What should I do about MAL-2025-49286?

Remove the package from your dependencies and lockfiles, then rotate any secrets on machines where it was installed.

Sources

Also known as GHSA-894m-pqq3-rvq3.

Is MAL-2025-49286 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free