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

hardhat-jsxnpm

Advisory published Updated

hardhat-jsx is a confirmed malicious npm package (MAL-2026-17507) that typosquats a legitimate package to trick installs (malicious version 2.0.1). Do not install it — remove it immediately and rotate any exposed credentials.

Malicious code in hardhat-jsx (npm)

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

What this malware does

The package is published as 'hardhat-jsx' but its metadata, documentation, and lib/ layout impersonate the pino logger (keywords 'fast','logger','stream','json'; shipped docs reference pinojs/pino). The main entry index.js unconditionally requires./lib/config, which is a 4,499,968-byte single-line obfuscator.io artifact — a hex-escaped string array of ~26,234 entries with string-array rotation and control-flow flattening (22,707 decoder-wrapper inlines, 44,499 string-inline changes). A legitimate pino 'config' module is ~1-2KB; a multi-megabyte obfuscated blob auto-loaded by the main entry is a loader/dropper. The surface index.js exports a no-op Express-style middleware whose comment claims it 'triggers a background process', providing a cover story adjacent to the obfuscated require. Loading the package via require/import executes the opaque payload in the installer's process. The name/content mismatch (hardhat-jsx vs. pino impersonation), the stub façade, and the heavily obfuscated auto-loaded module together form a trojan-package shape.

Malicious versions

1 flagged
2.0.1

Indicators of compromise (SHA-256)

62ac44be2745338b73861690e7f979216fdfc6c3797dfa2f450e9063aa4158d1

Detection & response playbook

Typosquat
  1. Find it

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

  2. If you installed it — respond

    hardhat-jsx is a typosquat — you almost certainly intended a legitimately-named package. Remove hardhat-jsx, install the correct package, and rotate any secrets exposed during the install since post-install scripts may have already run.

  3. Did it already run?

    If hardhat-jsx 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-jsx 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-020971

References

Credits

  • Amazon Inspector · finder

Detect & block this

O3 blocks hardhat-jsx-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-jsx (npm) malicious package — MAL-2026-17507 | O3 Security