tailwind-typography-stylecssnpm
Advisory published Updated
tailwind-typography-stylecss is a confirmed malicious npm package (MAL-2026-4681) that typosquats a legitimate package to trick installs (malicious version 0.8.3). Do not install it — remove it immediately and rotate any exposed credentials.
Malicious code in tailwind-typography-stylecss (npm)
What this malware does
Package name 'tailwind-typography-stylecss' impersonates the official '@tailwindcss/typography' plugin; the shipped README is a verbatim copy of the official package's documentation, instructing users to install under the squatted name. The package's main entry src/index.js contains the legitimate plugin source followed by an appended obfuscated payload that fires on every require()/import. The payload uses a bespoke shuffle-cipher decoder (function sfL with constants n=2667686, modulus 4289487) to recover the string 'constructor', then invokes Function.constructor on a decoded body string and calls the resulting function — a classic dynamic-eval-of-opaque-blob construction. Before invocation, the code explicitly assigns require and module onto the global object (global[_$1e42[0]]=require; global[$_1e42[2]]=module) so that the dynamically constructed Function — which normally has no closure access to module-scope identifiers — can still reach Node's require and module APIs. The combination of name impersonation, verbatim-legitimate-source-plus-appended-payload, custom obfuscator, Function-constructor execution, and deliberate re-exposure of require/module on globals leaves no benign interpretation. Any project that follows the README and require()s this package executes attacker-controlled code in the consumer's Node process.
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.
Malicious versions
Indicators of compromise (SHA-256)
Detection & response playbook
TyposquatFind it
Search your lockfiles and build artifacts for tailwind-typography-stylecss (version 0.8.3).
If you installed it — respond
tailwind-typography-stylecss is a typosquat — you almost certainly intended a legitimately-named package. Remove tailwind-typography-stylecss, 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 tailwind-typography-stylecss 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 tailwind-typography-stylecss-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.