Malicious code in loader-utils-kit (npm)
Description
loader-utils-kit ships lib/contract.js, byte-identical to the pino-testkit payload: an obfuscated module that decodes and evaluates code at load. It is a new name for the pino-testkit (MAL-2026-16484) campaign; the file hashes below match that record's evidence. The package presents itself as an ordinary utility, so the code runs on import or install without the user knowing.
--- -= Per source details. Do not edit below this line.=-
Source: amazon-inspector (4c8b82f4bc4ed348fbe3bf289dee3c31ea0daca432e56d46237cee30878e0494)
Package loader-utils-kit impersonates webpack's loader-utils: package.json sets author to 'Tobias Koppers @sokra' and repository.url to https://github.com/webpack/loader-utils.git, and the README is copied from upstream. The tarball adds a file lib/contract.js not present in upstream loader-utils, which contains a seeded-permutation string decoder that reconstructs a code body and executes it through the Function constructor after assigning require and module onto global. The file is not referenced from the declared main (lib/index.js) and no lifecycle scripts are declared, so the payload does not fire on npm install or on require('loader-utils-kit') in this version — it activates only if a consumer explicitly requires ./contract. The combination of identity-spoof metadata (author, repository URL, README) with an obfuscated Function-constructor payload shipped as a dormant trap is characteristic of a staged typosquat rather than a legitimate fork.