Malicious code in sw-pluginer (npm)
sw-pluginer, an npm package masquerading as a Tailwind plugin, contains malicious code that fetches and executes arbitrary JavaScript from a staged manifest file during the build process, granting attackers code execution on developer machines.
- Disclosed
- Last updated
- Blast radius
- Developers using sw-pluginer in their build process; arbitrary code execution on developer machines at build time.
- Ecosystems
- Attack vectors
- Affected entities
- sw-pluginernpm package presenting as Tailwind plugin for service worker registration
sw-pluginer is an npm package that presents itself as a Tailwind plugin for service worker registration. However, when Tailwind processes its configuration via require('sw-pluginer'), the package reads a URL from a staged file at node_modules/.bin/manifest.json, performs an HTTP GET request to that URL, and passes the response body directly to eval() in the Node build process.\n\nThe staging file is written by a separate dropper component and is deleted after being read, obscuring the payload destination from static inspection of the tarball. The fetched code is neither pinned, hashed, nor signature-verified, and executes in the developer's Node environment at build time rather than in a browser context.\n\nThis mechanism provides arbitrary code execution to whoever controls the staged manifest.json file, compromising the developer machine during the build process. The self-deleting indirection and unauthenticated network-fetched code execution constitute a covert dropper mechanism rather than legitimate service worker registration functionality.\n\nThe package was identified by the OpenSSF malicious packages project.
Indicators of compromise
- Packages
- sw-pluginer
Remediation
- Remove sw-pluginer from all projects immediately
- Audit build logs and developer machine activity for signs of compromise during the period the package was installed
- Regenerate any credentials or secrets that may have been exposed during builds
- Review and update dependencies to ensure no other malicious packages are present
- Use package integrity verification and lock files to prevent installation of unexpected versions
Sources
- GitHub Advisory GHSA-wp99-p72h-8pq6 · GitHub Advisory Database
Cite this entry
"Malicious code in sw-pluginer (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 19, 2026; last updated August 19, 2026. https://supplychainattack.org/incident/malicious-code-in-sw-pluginer-npm-1ycmwv
Suggest a correction
Found an error or have a newer source? Corrections to factual errors take priority over new entries.
Related incidents
- containedcritical
Malicious code in 3-buildsight-web (npm)
The npm package 3-buildsight-web contains malicious code that fetches and executes arbitrary JavaScript from a remote Bitbucket URL on module load, granting full page privileges to an unverified third party.
npmCompromised package - resolvedcritical
Malicious code in @usaa-grp-personal-profile/personal-profile-common (npm)
Malicious package @usaa-grp-personal-profile/personal-profile-common version 999.0.0 published to public npm as a dependency-confusion attack targeting an organization's internal registry. The package contains preinstall and postinstall hooks that exfiltrate hostname, username, and working directory to an attacker-controlled OAST endpoint on every install.
npmDependency confusionCompromised package - resolvedcritical
Malicious code in create-coin (npm)
create-coin@20.1.1 on npm contained malicious postinstall code that collected sensitive environment variables, credentials, and host reconnaissance data. The package impersonated an esbuild platform build and exfiltrated data to a hardcoded endpoint.
npmCompromised packageTyposquatting - resolvedcritical
Malicious code in @syncraft-labs/vue (npm)
The npm package @syncraft-labs/vue version 0.4.1 contained malicious obfuscated code in its ESM build that implements a blockchain-hosted C2 dropper (EtherHiding pattern), enabling remote code execution on any consumer importing the package.
npmCompromised package