Supply Chain Security

After XZ Utils: Rethinking Trust in Open Source Software

The XZ Utils backdoor forced the industry to confront uncomfortable questions about maintainer trust, funding, and the structural fragility of critical open source infrastructure.

Bob
Open Source Security Advocate
7 min read

The XZ Utils backdoor did not just reveal a technical vulnerability. It revealed a structural one. A single, overworked maintainer, pressured by sock puppet accounts and worn down by years of solo maintenance, handed the keys to an attacker who had spent two years building credibility. The technical backdoor was sophisticated, but the social engineering was mundane. It exploited something every open source maintainer knows intimately: burnout.

In the weeks following the CVE-2024-3094 disclosure, the security community had a rare moment of honest reflection. The conversations went beyond "how do we scan for this" and into "how did we build critical infrastructure on foundations this fragile?"

The Maintainer Problem

Lasse Collin maintained XZ Utils essentially alone for years. The project is installed on virtually every Linux system and is a transitive dependency for thousands of packages. Despite this, Collin was a solo maintainer dealing with bug reports, feature requests, and the thankless grind of keeping a stable compression library working across every platform and distribution.

In 2022, when pressure from apparent sock puppet accounts urged him to accept help, Collin acknowledged his situation publicly. He mentioned mental health challenges and admitted he could not keep up with the maintenance burden alone. This was not unusual. Surveys consistently show that a large percentage of critical open source projects are maintained by one or two people, often unpaid, often burning out.

Jia Tan offered help at exactly the right moment. The contributions were legitimate. The engagement was patient and professional. Over the course of two years, Tan became a trusted co-maintainer with commit access and release authority.

No amount of code scanning would have caught this. The social engineering targeted the governance layer, not the code layer.

The Trust Model Is Broken

Open source software operates on a trust model that was designed for a different era. The core assumptions are:

Many eyes make all bugs shallow. This is Linus's Law, and it was never really true for most projects. The XZ Utils build system modifications went unnoticed because almost nobody reads autotools build scripts, and even fewer review release tarballs against git repositories.

Maintainers are trusted by default. Once someone has commit access, their contributions receive less scrutiny. This is a practical necessity, as projects cannot function if every commit from a trusted maintainer gets the same review as an external pull request. But it means that compromising a maintainer account or identity is devastating.

Package managers distribute what maintainers publish. npm, PyPI, Maven Central, and Linux distribution package managers all fundamentally trust the upstream maintainers. There are signing mechanisms and reproducible build initiatives, but they are not universally adopted, and they would not have caught XZ because the maintainer themselves published the compromised release.

What Is Actually Being Proposed

The post-XZ conversation produced several concrete proposals, each with tradeoffs:

Reproducible builds

If distribution packages must be reproducibly buildable from source, a divergence between the tarball and git repository becomes detectable. The Reproducible Builds project has been working on this for years, and XZ gave them a powerful argument. The challenge is that reproducible builds are genuinely hard to implement at scale, and many projects (especially those using autotools) have legitimate differences between their git repos and release tarballs.

Build provenance and SLSA

The SLSA (Supply-chain Levels for Software Artifacts) framework provides a structured way to verify that a package was built from a specific source, using a specific build process, by a specific identity. Wider adoption of SLSA would make it harder (though not impossible) to insert code that exists only in the build artifacts and not in the source repository. Google, GitHub, and others have been pushing SLSA adoption, and XZ accelerated that push.

Maintainer identity verification

Some have proposed that maintainers of critical packages should undergo identity verification. The argument is that Jia Tan operated under a pseudonym for two years, and real-world identity verification might have deterred or at least complicated the attack. The counterargument is that pseudonymous contribution is a deeply valued principle in open source, enabling contributions from people in repressive regimes, people who face harassment, and people who simply want privacy.

Funding and support

Perhaps the most important proposal is the most boring: pay maintainers. If Lasse Collin had been funded to work on XZ Utils full-time, with resources for additional help, the pressure that made him accept an unknown contributor as co-maintainer would have been vastly reduced. Organizations like the Linux Foundation, OpenSSF, and Tidelift have programs for this, but the funding remains grossly insufficient relative to the scale of the problem.

Code review for build systems

The XZ backdoor specifically targeted the build system, which receives far less review attention than application code. Proposals to require CI/CD pipelines to build from source (rather than from release tarballs), and to flag build system changes for enhanced review, would address the specific vector used here. But build system expertise is rare, and adding review requirements slows down an already slow process.

The Uncomfortable Reality

Here is the truth that nobody wants to say directly: there is no complete solution to this problem within the current open source model.

If an attacker is willing to spend years building credibility, make legitimate contributions, and patiently wait for the right moment, they can compromise almost any project. The XZ attacker was caught because of a lucky performance anomaly detected by an unusually skilled engineer. The next attacker might be more careful about performance impacts.

This does not mean we should give up. It means we need to layer defenses:

  • Behavioral monitoring of software at runtime (catching the effects of backdoors, like the SSH slowdown)
  • Build provenance verification (SLSA, reproducible builds)
  • Automated comparison of release tarballs against source repositories
  • Sustainable funding for critical project maintainers
  • Governance standards for projects that qualify as critical infrastructure
  • Better tooling for reviewing build system changes

No single measure is sufficient. All of them together significantly raise the bar.

The Broader Supply Chain Context

The XZ incident did not happen in isolation. It came after years of escalating supply chain attacks: SolarWinds in 2020, Codecov in 2021, the ua-parser-js and colors.js npm incidents, and numerous typosquatting campaigns across every package ecosystem.

What set XZ apart was the patience and sophistication of the social engineering. Previous supply chain attacks typically involved compromising existing maintainer accounts (SolarWinds), exploiting CI/CD pipelines (Codecov), or hijacking abandoned packages. XZ showed that attackers are willing to invest years in building trust from scratch.

This raises the stakes for every project that accepts external contributions. The baseline assumption that a helpful contributor is acting in good faith is being weaponized. Finding the right balance between welcoming contributions and maintaining security is one of the defining challenges for open source in the coming decade.

How Safeguard.sh Helps

Safeguard.sh provides the kind of layered supply chain visibility that the post-XZ world demands. Our SBOM management platform continuously tracks every component in your software supply chain, from direct dependencies to deeply nested transitive libraries like liblzma. When new CVEs are published, version anomalies are detected, or supply chain advisories are issued, Safeguard.sh maps the impact against your actual deployments in real time. Our policy gate system lets you define and enforce rules about acceptable dependency versions, provenance requirements, and vulnerability thresholds, automating the kind of supply chain hygiene that manual processes cannot sustain at scale.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.