Poisoned Pipeline / Techniques / T0267
Move the install hook out of the registry into a git dependency
A registry tarball is a fixed, signed, reviewable object. A github:
specifier in a manifest is none of those: npm resolves it at install
time by cloning the repository's default branch, running prepare and
the other git-only lifecycle scripts when there is something to build,
packing the result, installing that pack, and then running its
preinstall, install and postinstall hooks. Whatever the repository's
package.json says at that moment is what executes.
web3-mev-error-decoder carried one dependency,github:outgoingyang/multicall-error-decoder, imported nowhere in its
own code. The repository's package.json held"install": "node dist/error-decoder/handlers.js". So the published
package had no install script, no child_process import, no eval and no
network code — a review of the tarball finds a clean library — while an
ordinary npm install ran Node code from a git repository. Kitsunox
resolved the default branch to commit 240aa9b685e2 on 12 November 2026
and recorded the hook; the registry no longer serves the tarball and the
repository, commit and account have been deleted.
Two properties make this more than a delivery trick. The payload is
mutable after review: the branch can be rewritten, or the repository
deleted, without touching the registry at all. And it is invisible to
scanners whose deeper stages only unpack the release, which is exactly
the failure Kitsunox documented — a single MEDIUM on the specifier, and
nothing on the code that would run.
Distinct from T0151, which is the hook itself and applies inside a
registry tarball, and from T0198, where a malicious dependency is
declared and resolves through the registry. Here the specifier's source,
not the package, is the attack surface: npm install of a package with
no lifecycle scripts of its own still executes code, and lockfiles record
the git URL where the package name would otherwise be enough.
Where this idea came from
From web3-mev-error-decoder, whose registry tarball carried no install script and no exec-capable code while npm cloned the declared repository, ran its prepare and install hooks and executed dist/error-decoder/handlers.js; Kitsunox scored the release MEDIUM on the specifier alone and 12 once it resolved git dependencies. Distinct from T0151 (the hook itself inside a tarball) and from T0198 (a malicious dependency that resolves through the registry).
Mitigations
None linked yet.
Detections
None linked yet.