XZ Utils Backdoor: Two-Year Social Engineering of Open Source Maintainer
An attacker spent two years patiently building trust with an overworked open source maintainer, eventually being granted commit access and inserting a sophisticated backdoor into XZ Utils — present in nearly every Linux distribution.
Attack Chain
- 1XZ Utils maintainer targeted
- 2Attacker builds trust over 2 years
- 3Malicious commits merged
- 4Backdoor in SSH daemon
- 5Discovered before widespread deployment
Background
XZ Utils is a data compression library present in virtually every Linux distribution. Its maintainer, Lasse Collin, maintained it largely alone for years. In 2022, a GitHub user named "Jia Tan" began contributing high-quality patches. Over two years, Jia Tan gained commit access and eventually became effectively a co-maintainer.
The Attack
Jia Tan's long-term social engineering included: submitting genuine, valuable code contributions over two years; applying social pressure (with help from sockpuppet accounts) suggesting Collin's maintenance was insufficient; gaining a formal maintainer role; then inserting a sophisticated backdoor into XZ Utils 5.6.0. The backdoor targeted OpenSSH's systemd-integrated version on systemd-based Linux systems, modifying the RSA key authentication process to allow remote code execution using a hidden private key. It was found only because Microsoft developer Andres Freund noticed slightly elevated CPU usage in SSH connections and investigated.
Response
Freund reported the backdoor on March 29, 2024, just days after the affected version began rolling out to Linux distributions. Most distributions had not yet deployed 5.6.0 to stable channels. Affected distributions rolled back to 5.4.6. The open source security community launched a massive investigation. Jia Tan's identity remains unknown.
Outcome
The backdoor was caught extraordinarily early — largely by chance — before it reached stable Linux releases at scale. If deployed, it would have given its creators a master key to log in to a significant fraction of the world's Linux servers. The operation demonstrated that patient, multi-year social engineering of open source maintainers is a viable nation-state strategy.
Key Takeaways
- Critical open source projects must have multiple maintainers and require review of all commits regardless of contributor reputation
- The burnout of open source maintainers creates social engineering opportunities — support maintainers of critical infrastructure
- Sockpuppet pressure campaigns accelerating trust in open source communities are a documented attack technique
- Even tiny performance anomalies deserve investigation — the XZ backdoor was found through 500ms of extra SSH latency