Blog / A08:2021 Software and Data Integrity Failures
A08:2021 · Software and Data Integrity Failures

A Wildcard Version Is a Blank Check

One dev dependency is pinned to any version. The next release your registry serves, safe or not, is the code your test script runs.

dependency pinnedto wildcardnew releasepublished…install resolvesto itscript invokesits binaryattacker coderunsATTACKER INPUTIMPACTtrust boundary crossed
Attack path · dependency pinned to wildcard → new release published upstream → install resolves to it → script invokes its binary → attacker code runs

One dev dependency is pinned to any version. The next release your registry serves, safe or not, is the code your test script runs.

What goes wrong

A build-time dependency is declared with a wildcard version, so install resolves to whatever the registry currently serves as newest. There is no ceiling and no lock to a reviewed release. Tomorrow's version, which nobody on your team has seen, is fair game.

That dependency ships an executable your test script calls. If the maintainer account is compromised or the package is taken over, the attacker publishes a new release, your next install pulls it, and the script runs it. The code executes wherever the script runs, on a developer's machine or a CI runner, anywhere with your source and often your secrets.

Wildcards feel convenient because you never think about upgrades. That is the problem. You have delegated the choice of which code to run to whoever can publish to that package, and you have agreed to accept it sight unseen.

The pattern

Vulnerable
// dependency manifest
devDependencies:
  build-tool: '*'        // any release, chosen at install time
// a script then runs its binary
scripts:
  test: build-tool run
Hardened
devDependencies:
  build-tool: '3.2.1'    // exact, reviewed version
// plus a committed lockfile with integrity hashes,
// upgrades land through a reviewed change
How the pipeline adjudicated itHELD
ABCDEFGH

Grounding and reachability were confirmed. The exploit-path gate would not conclude without the calling code, so the finding was held and an evidence request was raised instead of being reported as fact.

Ed25519 · per-tenant signing key · gate ledger A–H · verify offline against the published payload hash

Why it matters to you

Dependency takeover is a routine supply-chain attack now, and dev tooling is a soft target because it runs with less scrutiny than production code. A wildcard on anything that executes turns a compromised upstream release into code running in your build. Pin exact versions and commit a lockfile with integrity hashes. Make every upgrade a reviewed change instead of an automatic one.

Check your own code