postcss-minify-selectornpm
postcss-minify-selector is a confirmed malicious npm package (MAL-2026-5837) that typosquats a legitimate package to trick installs (malicious versions 0.1.2, 0.1.3, 0.1.4…). Do not install it — remove it immediately and rotate any exposed credentials.
Malicious code in postcss-minify-selector (npm)
What this malware does
Package is published as postcss-minify-selector (singular) but its internal postcss plugin identifier is postcss-minify-selectors (plural) — the canonical name of the legitimate cssnano plugin. The published name is a one-character deletion from that target. The first executable line of src/index.js is a side-effect-only require('postcss-minify-selector-parser/cjs-runner') whose return value is discarded and which is not referenced anywhere else in the file; the plugin's actual selector-parsing functionality uses a different subpath, require('postcss-minify-selector-parser/selector-parser'), imported separately at line 6. The sibling dependency postcss-minify-selector-parser (declared as ^2.0.2 in package.json) is itself a typosquat-shaped name of the well-known postcss-selector-parser. The combination — typosquat lure name, plural-vs-singular mismatch with the real cssnano plugin, declared dependency on a second typosquat-shaped package, and an unconditional side-effect require of an otherwise-unused subpath of that dependency at the top of the main entry — is the canonical lure-plus-dropper shape: any consumer that require()s this package will silently load and execute whatever the cjs-runner module body of the sibling typosquat does at require time.
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
Scan your lockfiles (package-lock.json, pnpm-lock.yaml, yarn.lock, requirements.txt, poetry.lock, etc.) and build artifacts for postcss-minify-selector (12 malicious versions). O3 Security's supply-chain scanner checks every dependency against known-malicious package intelligence at install time and in CI, flagging postcss-minify-selector across your stack and pipelines.
If you installed it — respond
postcss-minify-selector is a typosquat — you almost certainly intended a legitimately-named package. Remove postcss-minify-selector, 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 postcss-minify-selector was ever installed, its post-install/runtime payload may have already executed. O3's L7 egress monitoring and runtime eBPF sensors detect the credential exfiltration or command-and-control callback after install and block the malicious outbound channel, so you catch and contain the actual compromise — not just the presence of the package.
How O3 protects you
O3 blocks postcss-minify-selector before install through its supply-chain scanner, and if it has already run, detects and severs the exfiltration or C2 callback at runtime through L7 egress monitoring and eBPF.
Frequently asked questions
Campaign
References
Credits
- Amazon Inspector · finder
Detect & block this
O3 blocks postcss-minify-selector-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.