sw-pluginer@1.0.0
Malicious code in sw-pluginer (npm)
Analysis
sw-pluginer@1.0.0 is published as a Tailwind CSS plugin that "automatically registers a service worker from a cached manifest", but its plugin entrypoint executes remote code in the consumer's build process. On load, index.js calls lib/manifest-reader.js, which reads a staging file at node_modules/.bin/manifest.json, immediately deletes it with fs.unlinkSync(), and returns the "path" string from it. index.js passes that value to lib/worker-fetcher.js, which performs an http/https GET against it with no host allowlist, accepts any response whose content-type contains "javascript" or "text/plain", logs the URL to the console, and returns the body. lib/register-worker.js then runs eval() on the downloaded body inside the Tailwind build, giving whoever controls the manifest URL arbitrary code execution in the developer or CI environment and any credentials available there. The package ships no callback endpoint of its own and no obfuscated or encoded strings; the remote address is supplied entirely by the dropped node_modules/.bin/manifest.json file, which the loader consumes and removes, so it has no self-contained network IOC. There is no repository field, no lifecycle script and no dependency tree backing the described functionality.
- analyzed by
- Leitwacht
- first seen
- Nov 17, 2026, 03:35 PM
- analyzed
- Nov 18, 2026, 12:09 AM
- weekly installs
- 126
Related advisories
- sw-pluginer@1.2.0 same package
- sw-pluginer@1.1.0 same package
- @ifasn/mmdd-doc-mcp@1.1.8
- retry-utils-testmetest@1.0.3
- event-bus-lite-testmetest@0.0.2
- envforge3@1.0.1
- catwrestlingbird@1.0.0
- leb128x@1.0.1
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.