← Lab /Security & privacy

Many popular package managers fail to verify package integrity by default

Fewer than half of the 25 most popular package managers verify package integrity by default and only two verify every downloaded package

Security & privacy Trail of Bits 14 Oct 2026 Measurement Prototype evidence

Published as “Package managers have an integrity problem”

Why it matters

Developers cannot rely on default behavior of many package managers to protect against supply-chain attacks.

Summary

The author built a Docker-based harness that intercepts package manager traffic with mitmproxy to simulate a malicious repository. Running default install commands for 25 popular managers, they observed that lockfile-based hash verification is enabled by default in only about half of them, and signature verification is default only in Go. Notably, cpanminus still uses plain HTTP, and many managers require extra configuration to verify signatures. The evidence is based on a single package, single version, and single platform per manager, limiting generality.

What they found 3

  1. Less than half of the tested managers use lockfiles that check for tampering by default

    “fewer than half used lockfiles that checked for tampering by default, and only two verified the integrity of every package they downloaded.”

  2. Only Go verifies signatures by default; all others need extra configuration or lack support

    “only Go verified signatures by default; others required extra configuration, lacked verification code, or did not support signatures.”

  3. cpanminus connects via unencrypted HTTP by default, allowing active network attackers to inject code

    “cpanminus uses unencrypted HTTP by default to connect to the Perl package repository, allowing any active network attacker to inject malicious code into downloaded packages.”

Caveats 6

  • The study tests only a single package, a single version, and a single platform per manager, which may not reflect typical usage
  • Some managers support integrity checks but require non-default flags or configuration, which the author treats as a failure
  • The author notes that the test environment (e.g., PowerShell and CocoaPods on Ubuntu) may not represent the most common deployment patterns
  • Limited to testing a single package with a single package manager version on a single platform
  • Test conditions (e.g., PowerShell and CocoaPods on Ubuntu) may not represent the most common usage patterns
  • Only default command flags were used; extra-step configurations were not counted as successful verification

What’s new here 4

  • Evaluated 25 package managers against a malicious repository using an automated Docker/mitmproxy harness
  • Found that only two managers verify every package's integrity by default
  • Identified cpanminus as the only manager that defaults to unencrypted HTTP
  • Documented widespread gaps in default signature verification across ecosystems