---
title: "Package managers have an integrity problem"
description: "An experiment across 25 popular package managers tested whether each detects a compromised repository injecting malicious code into legitimate packages."
url: "https://swe.quest/articles/package-managers-have-an-integrity-problem-ecf30aa0bc2c3af8"
canonical: "https://blog.trailofbits.com/2026/10/14/package-managers-have-an-integrity-problem/"
source: "Trail of Bits"
published: "2026-10-14"
difficulty: "medium"
kind: "Research"
reading_minutes: 21
tags: ["supply-chain-security","build-systems","cryptography"]
---

# Package managers have an integrity problem

A post on [Trail of Bits](https://swe.quest/sources/trail-of-bits.md), published 2026-10-14, 21 min read, Research. Original: [https://blog.trailofbits.com/2026/10/14/package-managers-have-an-integrity-problem/](https://blog.trailofbits.com/2026/10/14/package-managers-have-an-integrity-problem/)

## Summary

An experiment across 25 popular package managers tested whether each detects a compromised repository injecting malicious code into legitimate packages. Fewer than half verify lockfile hashes by default, only Go and vcpkg verify every download, and only Go checks signatures by default. The tests used a Docker and mitmproxy harness that simulated a malicious server. Several failures are documented design choices rather than bugs: Pub and older pnpm overwrite mismatched hashes, Conan and CocoaPods use MD5 or SHA-1 identifiers that are never rechecked, Composer trusts GitHub-served ZIPs, and cpanminus still uses plain HTTP. Lockfiles serve many purposes besides integrity, which helps explain the gaps.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Supply chain security](https://swe.quest/tags/supply-chain-security.md) (Security)
- [Build systems](https://swe.quest/tags/build-systems.md) (Engineering practices)
- [Cryptography](https://swe.quest/tags/cryptography.md) (Security)

## Prerequisites

- lockfiles and dependency resolution
- cryptographic hashes and signatures
- supply-chain attacks

## Keywords

mitmproxy, Go modules, vcpkg, pnpm, Pub, Conan, CocoaPods, Composer

## Related posts

- [Securing the Docker MCP Catalog: Commit Pinning, Agentic Auditing, and Publisher Trust Levels](https://swe.quest/articles/securing-the-docker-mcp-catalog-commit-pinning-agentic-auditing-and-publisher-91efbeaa90e18d9c.md): Docker · 2025-12-03 · Medium · 8 min read · Supply chain security, AI agents, Sandboxing & isolation, Containers, CI/CD
  Docker's MCP Registry now pins every Docker-built MCP server to a specific Git commit, enforced in CI and propagated to the org.opencontainers.image.revision label, so builds are deterministic and verifiable with docker inspect or cosign.
- [From single pull requests to full software packages: Detecting malicious code at scale](https://swe.quest/articles/from-single-pull-requests-to-full-software-packages-detecting-malicious-code-at-717a58a001a046a1.md): Datadog Engineering · 2026-06-02 · Medium · 12 min read · Supply chain security, Threat detection, AI agents, LLMs, Cost optimization
  Datadog extended BewAIre, its LLM-based malicious code detector, from pull requests to full dependency packages by stacking a cheap filter model in front of an agentic investigation model.
- [Dependency prefixes are a supply chain risk: let's fix them](https://swe.quest/articles/dependency-prefixes-are-a-supply-chain-risk-let-s-fix-them-9228bb37d2c90199.md): Sourcegraph · 2026-05-22 · Medium · 5 min read · Supply chain security, JavaScript, Build systems, Refactoring & migrations
  SemVer range prefixes like ^, ~ and wildcards in package.json act as a trust policy that lets compromised or hijacked packages flow into CI and production on the next install.
- [Defending Your Software Supply Chain: What Every Engineering Team Should Do Now](https://swe.quest/articles/defending-your-software-supply-chain-what-every-engineering-team-should-do-now-434c4d75b0885a00.md): Docker · 2026-04-02 · Medium · 9 min read · Supply chain security, CI/CD, Containers, AI agents
  Recent supply chain compromises (the axios npm hijack attributed to Lazarus Group, the TeamPCP campaign via Trivy's GitHub Action, Shai-Hulud, GlassWorm) share one root cause: implicit trust in mutable tags, broad long-lived tokens and unsandboxed runners.
- [How Software Bill of Materials change the dependency game](https://swe.quest/articles/how-software-bill-of-materials-change-the-dependency-game-78d74981c640e90b.md): Zalando Engineering · 2023-04-12 · Medium · 5 min read · Supply chain security, Microservices, Build systems, Analytics & OLAP
  Zalando generates a Software Bill of Materials from the container image of every deployed application and publishes the dependency data to its data lake, so any engineer can query which apps use a library version, which licenses are in use, and how fast upgrades are adopted.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
