tailwindcss-hook-formsnpm
Advisory published Updated
tailwindcss-hook-forms is a confirmed malicious npm package (MAL-2026-19145) that typosquats a legitimate package to trick installs (malicious version 0.5.2). Do not install it — remove it immediately and rotate any exposed credentials.
Malicious code in tailwindcss-hook-forms (npm)
What this malware does
The package impersonates @tailwindcss/forms: name, repository (tailwindlabs/tailwindcss-forms), author (@tailwindcss), README, CHANGELOG, and HTML are copied from the legitimate plugin, with a demo link to tailwindcss-hook-forms.vercel.app. src/index.js prepends a hand-rolled string-permutation decoder (spin() with magic constants NX/SX, splitLane/peel wrappers) that resolves the Function constructor via peel.constructor and immediately invokes a function compiled from a ~15KB opaque, obfuscated string literal, passing the host require into it. This fires whenever any consumer imports the package, running attacker-controlled code in the installer's Node.js process with full access to require, process, filesystem, and network. The subsequent code replicates the public API of @tailwindcss/forms as cover. The obfuscator scheme does not exist in the legitimate plugin and its only purpose is to conceal the executable body from review.
Malicious versions
Indicators of compromise (SHA-256)
Detection & response playbook
TyposquatFind it
Search your lockfiles and build artifacts for tailwindcss-hook-forms (version 0.5.2).
If you installed it — respond
tailwindcss-hook-forms is a typosquat — you almost certainly intended a legitimately-named package. Remove tailwindcss-hook-forms, install the correct package, and rotate any secrets exposed during the install since post-install scripts may have already run.
Did it already run?
If tailwindcss-hook-forms 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
Campaign
References
Credits
- Amazon Inspector · finder
Detect & block this
O3 blocks tailwindcss-hook-forms-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.