npm

The hauntview npm Supply Chain Attack

Updated 10 Nov 2026 · Incident date 9 Nov 2026

hauntview 0.2.9 on npm runs hidden, scrambled code at npm install.

Version 0.2.9 adds a hidden loader to two files. The loader runs when you install the package.

What happened

Version 0.2.9 adds one long line to the top of two files.

  • The postinstall script scripts/postinstall.mjs runs at npm install.
  • Long runs of blank characters push the new line out of view.
  • The line unscrambles text from an array of strings.
  • It reads Function through d[p.substring(0,11)] and runs the unscrambled text with Node's require.
  • dist/cli.js, the haunt and hauntview commands, has the same line.

Vigilance caught version 0.2.9 at 22:12 UTC on 9 November 2026, 1 minute 15 seconds after it went up on npm. The Aikido malware list names this attack and shows no date. Vigilance does not count this catch as first.

Affected versions

  • hauntview 0.2.9 (published 2026-11-09 22:11 UTC)
  • 0.1.9 does not have the loader.

Indicators of compromise

  • NX= [6912847,367,20411,613,43759,5019283] starts scripts/postinstall.mjs or dist/cli.js
  • The same line holds SX= [5283741,241,41953,187,56129,4738901] and ends with (global,require)

How to check

Find the installed version.

npm ls hauntview

What to do now

  1. If you installed 0.2.9, remove it.
  2. Rotate the secrets that the installing user can read.
  3. Pin your lockfile to a version before 0.2.9.

What Vigilance would show

Vigilance checks each update before it installs. This is what a customer sees, rebuilt from the facts on this page.

On the computer, at install

Vigilance blocked `hauntview` 0.2.9. This version is too new or changed in a way Vigilance must check first.

In the owner report

Bad update

hauntview 0.2.9

This update now runs a command on its own when it is installed and runs other programs. The version before it did not.

Frequently asked questions

Does the attack need me to run the package?

No. The postinstall script runs the hidden code at npm install.

Is version 0.1.9 safe?

Version 0.1.9 does not have the hidden loader. Its postinstall script only installs Playwright Chromium.

Sources

  1. registry.npmjs.org/hauntview

More supply chain attacks

All 145 attacks in the library · npm supply chain attacks · How to prevent supply chain attacks

Check the next update before you install it

Vigilance compares the version you trust with the new one. It names the one file that gained a power the old version did not have.

Start the free 14-day trialBrowse the attack library