Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
Malicious package

hardhat-ftpnpm

Advisory published Updated

hardhat-ftp is a confirmed malicious npm package (MAL-2026-17506) that executes malicious code on install (malicious version 2.0.1). Do not install it — remove it immediately and rotate any exposed credentials.

Malicious code in hardhat-ftp (npm)

MAL-2026-17506
Immediate action
Remove the package, then rotate any secrets the build/runtime could reach.
npm uninstall hardhat-ftp

What this malware does

The package's declared main entry index.js unconditionally requires./lib/config, a 4,499,968-byte obfuscator.io-packed file (26,234-entry string array, hex-renamed identifiers, control-flow flattening, top-level IIFE) that executes as soon as any consumer runs require('hardhat-ftp'). After string-array decoding the loader resolves to execSync and spawn sinks, and the package declares axios as a dependency, giving the import-time payload both outbound HTTP and local command-execution primitives with the concrete command targets concealed behind the obfuscation. The surrounding package is a cover: it is published under the name hardhat-ftp with a vulnerability-management description, but the README headers, badges, and ecosystem links are lifted from pinojs/pino, and the files under lib/ (proto.js, levels.js, transport.js, multistream.js) mirror the pino source tree. The name/README/code mismatch, the scale of the obfuscation, and the presence of exec+HTTP primitives inside the auto-loaded module match the masquerade-dropper pattern: installing or requiring this package triggers execution of concealed attacker-controlled code on the installer's host.

Malicious versions

1 flagged
2.0.1

Indicators of compromise (SHA-256)

5e916c23a0efbd49d3cfcd5993957df7afbade3f454925d0672acc8c9f68245c

Detection & response playbook

Malicious package
  1. Find it

    Search your lockfiles and build artifacts for hardhat-ftp (version 2.0.1).

  2. If you installed it — respond

    Remove hardhat-ftp from your project and lockfile, then assume any secrets accessible to the build or runtime were exposed: rotate API keys, tokens, and credentials, and audit for unexpected outbound activity or persistence.

  3. Did it already run?

    If hardhat-ftp was installed, its post-install payload may already have run. Removing the package does not undo that — check outbound connections and credential use from the install window onward.

Frequently asked questions

No. hardhat-ftp on npm has been identified as a malicious package (version 2.0.1 flagged). It should be removed immediately — do not install or keep it in your dependency tree.

Campaign

IN-MAL-2026-020972

References

Credits

  • Amazon Inspector · finder

Detect & block this

O3 blocks hardhat-ftp-class packages before install and in CI — and if it already ran, its runtime egress monitoring catches the malicious outbound activity and severs the channel.

Explore

hardhat-ftp (npm) malicious package — MAL-2026-17506 | O3 Security