Skip to content
ecdsa.com
npm audit signatures (npm 9.5+)Package managers

Error message

1 package has an invalid registry signature:

Also printed as

  • Someone might have tampered with this package since it was published on the registry!
  • packages have invalid registry signatures:
  • has a registry signature with keyid: SHA256:demo-registry-key-2026 but no corresponding public key can be found

Plural form: "N packages have invalid registry signatures:". A signature whose `keyid` is not among the registry's keys fails with code `EMISSINGSIGNATUREKEY` ("…has a registry signature with keyid: … but no corresponding public key can be found"); invalid provenance attestations are listed under "…has an invalid attestation".

npm audit signatures (npm 9.5+) — registry signature check of installed packages

What it means

npm downloaded the registry's public signing keys and checked each installed package's registry signature — an ECDSA signature over `name@version:integrity` — and for at least one package it did not verify. Either the package metadata (including the integrity hash of the tarball) changed after the registry signed it, or the registry you installed from signs with keys it does not publish. npm lists the affected packages and ends with "Someone might have tampered with this package since it was published on the registry!".

Why it happens

How to fix it

  1. 1.

    Compare with the public registry

    If the public registry's integrity for the same version matches your lockfile, the mirror is the problem; if not, the lockfile or the package was changed.

    bash
    # Same version, straight from the public registry: does the integrity match your lockfile?
    npm view left-pad-lite@1.0.0 dist.integrity --registry https://registry.npmjs.org/
    grep -A3 '"node_modules/left-pad-lite"' package-lock.json | grep integrity
  2. 2.

    Run the check in CI

    `npm audit signatures` after `npm ci` makes the build fail on unsigned, wrongly signed or provenance-mismatched dependencies.

    yaml
    # CI: fail the build on missing or invalid signatures and provenance
    - run: npm ci
    - run: npm audit signatures

Related errors

Browse the full signature error database