August 12, 2025

Persistent Risk: XZ Utils Backdoor Still Lurking in Docker Images

By Binarly REsearch

At the end of March last year, the entire cybersecurity community was rocked by the discovery of the infamous XZ Utils backdoor.  ‘Jia Tan’, a developer who had spent two years building significant credibility in the project through numerous contributions, inserted a sophisticated backdoor into the xz-utils packages. The discovery sent cybersecurity experts, including the Binarly REsearch team, scrambling to reverse engineer the backdoor to understand its scope and potential impact. 

In short, the backdoor was embedded in the liblzma.so library, which is used by the OpenSSH server, and is triggered when a  client interacts with the infected SSH server. By hijacking the RSA_public_decrypt function using the glibc’s IFUNC mechanism, the malicious code allowed an attacker possessing a specific private key to bypass authentication and execute root commands remotely. 

What really stood out in this story is that the backdoor’s impact wasn’t just theoretical, as malicious xz-utils packages containing the backdoor were distributed by several major Linux distributions, including Debian, Fedora and OpenSUSE. This had serious implications for the software supply chain, as it became challenging to quickly identify all the places where the backdoored library had been included. Within 24 hours, Binarly released XZ.fail, a free static analysis-based tool designed to detect suspicious IFUNC resolvers with near-zero false positives.

In this blog, we share a new finding in the XZ Utils saga: several Docker images built around the time of the compromise contain the backdoor. 

At first glance, this might not seem alarming: if the distribution packages were backdoored, then any Docker images based on them would be infected as well. However, what we discovered is that some of these compromised images are still publicly available on Docker Hub. And even more troubling, other images have been built on top of these infected base images, making them transitively infected. 

In all, we identified more than 35 images that ship with the backdoor. While this may seem like a small number, we only scanned a small portion of the images published on DockerHub, stopping at second-order images. Additionally, we focused solely on Debian images, as they retain historical data on Docker Hub. 

The impact on Docker images from Fedora, OpenSUSE, and other distributions that were impacted by the XZ Utils backdoor remains unknown at this time.

Lingering Backdoors in Docker Hub Images

At Binarly, we always strive to deliver meaningful results to our customers, increasing their visibility into real security risks and reducing false positives. To achieve this, we are constantly sharpening our tools to stay ahead of evolving threats and deliver precise, actionable insights. Recently, we collected a massive dataset of nearly 15TB of Docker images, which we successfully used to enhance our secrets-finding capabilities. 

Given the effort required to build the dataset, we decided to sharpen other capabilities of the Binarly Transparency Platform, specifically the analyses related to malicious code detections. This suite of automated analyses focuses on common types of modifications, such as anomalies in ELF files and various hooking techniques, including the IFUNC hooking method used by ‘Jia Tan’ to implement the backdoor.  

During this process, we discovered that 12 Debian Docker images available on Docker Hub still contain one of the xz-utils backdoor, more than a year after the public discovery of the backdoor.

Tag Manifest Digest Blob Hash
rc-buggy-20240311 a702c7f4bb57a17762e258871f45f8273ae49bec5515452d5133e66450c95ba5 3a737ad8ab65fe5ad068d6094fbf99ce9ed2b5beff9c86daceee8c2c50182bde
experimental-20240311 81992d9d8eb99b5cde98ba557a38a171e047b222a767dc7ec0ffe0a194b1c469 cd5a0401cc26824227d6ffe1f921e91657dc46666e0f20f408d8d154ca49f5c0
unstable-20240311-slim 7a3332fbf100a0ef9762ead20a4224665768b237c5bfedfe0f86bf88e0c13b7a 40f436db82f2316ccced5a0deef57fac6eb766b073d7e64d5dfe93e6782482b1
unstable-20240311 8690225da3ca369e9be720446f73e0aa06f290776fdf2605b6ec80c2b229b9f6 cd5a0401cc26824227d6ffe1f921e91657dc46666e0f20f408d8d154ca49f5c0
trixie-20240311-slim d4e306f14b8b7389b36be8fb0eadab638cb7744546a33a74f0fc27bb9037dc14 b94224647092fbfb1fa9ceb18cf55a60f5a00183971516dd46f1f72f5f7b26df
trixie-20240311 85068c773f7fcc9c9acd8f244759cb2131e7a1775c5bf8d6710f76e7467fa3f1 93e647bfd891e82156d7a13e0f0b194003855008967ec51e962ea0d70fc59ff6
testing-20240311-slim c2e15dd5788b20f360ab3f2d8b60111b6e8b011c5c4960e0129551c743f5cd30 243521c5a6cd930662c078eec5f83156663f3197cf12158ce60e0a0f9d0a3eb6
testing-20240311 0746d89c588160d0470beaae7a55e38305ede06cb5717d132bd6a795610234d8 522a6d12a8a3032c984d93fd141274f1cb7cc1e9a6942e3b36cbf803bbe36a12
sid-20240311-slim 94596b0770714bac6e8adef7e1d3dbc16245ad2978f94006587e44850343cb88 554b70c8b9ed0854851a55e915cefa47cdc18fed201b4aba87193d575410b53d
sid-20240311 0aff2113f50451631f0f8c22d85c97aad855d73545b6018fcbe9f0a78ae26583 3a737ad8ab65fe5ad068d6094fbf99ce9ed2b5beff9c86daceee8c2c50182bde
untagged fa2016c58b4df666286dfa14b2402c05d60c556ecfd4c60635b64ad21380edba 93e647bfd891e82156d7a13e0f0b194003855008967ec51e962ea0d70fc59ff6
untagged e24f4205978e6c0f98697e2075439825f86df56457d2d1ea9e0f8593cf5b5236 522a6d12a8a3032c984d93fd141274f1cb7cc1e9a6942e3b36cbf803bbe36a12

Table 1. Docker images for Debian that contain the XZ Utils backdoor. All affected images are built for the amd64 architecture.

After this initial discovery, we began to wonder: what about other images that might have been built on top of these compromised Debian images? Unfortunately, the Docker API doesn’t provide a reverse index that maps an image to all the base images using it. Because of this, we decided to build a script that fetches all images present in a Docker Hub repository and checks whether any are based on the compromised Debian images. 

Since Docker Hub contains nearly 12 million repositories (each possibly containing hundreds or even thousands of images) it would be infeasible to scan the entirety of it. Therefore, we manually created a list of repositories likely using Debian-based images. This list is far from perfect, as it only includes repositories we found manually or those returned from Google searches using the base image blob hash. 

Repository Tag Latest Tag? Manifest Digest
buildpack-deps untagged - 5e4438a4660fff39ff4671bc5ecfaea3e639dafe61d5c19c735335c96d61c1e4
buildpack-deps untagged - 443be2e684c2974f94329fe904ab025826cd45f4a1dc52a922e5b01e66e75ee0
buildpack-deps untagged - 8f95f8a59ac3227cb7483799a6836e9c79d5cef491ba672c1958abdf36bf7648
buildpack-deps untagged - bf7c5e7df1344c29825cecf0b13a48e3542d9076344bb488f886f9dfce534e05
buildpack-deps untagged - 8d5e5912bc9fdc287f89b87e7b97a615110842f6c6f3ed380dccef85a75ef6cc
buildpack-deps untagged - d650be418934c90f6e9e3efcb52bef7ad660324074002efb8541e7baf9aab6d8
neurodebian untagged - 388d46f65da097cd9371385d9c2f3f3fe04d4bc88b529b52125b9f94d74edaff
neurodebian untagged - 7ffa336b9a0f2e594d1df70ce66a259db156902baa371337a6bfaae2eefa4de3
r-base untagged - 3b5c502ccd9d4a6c0937a6bfc51e02741bdc7c520fe458ce4d9c136553df42b0
georchestra/jenkins-builder sid-jdk-8 YES d7ad7c3386a874e81006bc6fab0ce7eb5cf227f4a1c2d3dff7850e17ff7a5f48
myoung34/github-runner 2.315.0-debian-sid NO 8c0c44b7404fdcdc52f4c04d41b2a674510ac98f21fb81cd68575be30eeb51a7
slash5toaster/calibre 7.7.0 NO fa5dcddaa909b76a8b6c5fb44a8eb833ab2f407f81cc7185a9c299e02cc1c2ef
flowgunso/seafile-client 9.0.4 NO b6d1c3b9232874356dee489685528f94c048e6683573cdb5b0a0b106e3d85708
makepad/opencv trixie-4.8.1 NO 153319e41415b5a789704e31017aff2e2c8223c2e155875947639935fa4f72ca
makepad/opencv trixie-4.8.0 NO 1b5b2b14dc1262074e0b933ae8a483a5f21c5fc2e9dd42f0b7e8f2fa2ebc12a0
makepad/opencv trixie-4.7.0 NO 060fddaf2879513e900d0e93097c3096f541ca871c390639bb6cb67c6fd1bc84
makepad/opencv trixie-4.9.0 YES 2fdc5fa0c19fe4e04d3117477f49b8b7e0e4124290d9f4270f215f8e7c5b9078
makepad/opencv trixie-slim-4.8.0 NO f5e90754a89e6837c7b5165b57ffd4d5d66990d798bfce1018048b7ac21f0e6a
makepad/opencv trixie-slim-4.9.0 YES 7a4e5b592b318a38542dd21f87a810263d39a3b4caf9d85bb973594264a38fca
makepad/opencv trixie-slim-4.8.1 NO cdb95cc294d7ea4f1703e817674c477e99a80be16a6c980f88365f77c195f0f0
makepad/opencv trixie-slim-4.7.0 NO 94a10719a142f3b11c6d8cd4bc88b415a163f7052061c22222df7c4c96a95aa2
optionfactory/debian13 80 NO 1dedf1ad124f7eff12011122565bed92c207d3cd1c9b650a40fb680d846bd515
optionfactory/debian13 81 NO 1dedf1ad124f7eff12011122565bed92c207d3cd1c9b650a40fb680d846bd515
controlplane/sectools latest YES 86090b316ad096e53c81f91e94ac2ae95c2f28feee10ce8ec32aa573d8263021

Table 2. Second-order docker images (based on the compromised Docker images) containing the XZ Utils backdoor. The “Latest Tag?” column reports whether the affected tag is the latest available one.

The previous table lists the second-order images containing the XZ Utils backdoor. While some appear to be personal projects, other images may be used in enterprise environments. In a recursive fashion, these images could themselves serve as base images, leading to the creation of impacted third-order images and so on and so forth. Doing such a recursive exploration is the only way to gain meaningful insights into the extent of the backdoor’s propagation within the Docker ecosystem.

Disclosing our findings 

Upon discovering this issue, Binarly immediately notified the Debian maintainers and requested removal, but the affected images remain in place.

Figure 1. Response from the Debian maintainer to our disclosure

We only partially agree with this response: while it is true that users should rely on up-to-date images, leaving publicly available Docker images that contain a potential network-reachable backdoor poses a significant security risk. Even if the practical impact of this issue is somewhat limited, given that exploitation requires the backdoor key owners to have network access to the infected device or container with the SSH service running. 

Nonetheless, our discovery underscores how even short-lived backdoored builds can remain unnoticed and persist in container registries for a very long time.

Responding to “XZ Utils”-like incidents with the Binarly Transparency Platform

Security incidents affecting the software supply chain are more frequent than ever. This is one of the key motivations for building the Binarly Transparency Platform: we want to empower security researchers, product security teams and organizations with the right tools they need to detect and remediate threats effectively.    

From day one BTP customers had access to a precise analysis developed by our research team to detect IFUNC-based hooking, which is the same technique used in the XZ backdoor. This is the same technology that powers xz.fail, a free scanning tool that Binarly released to support the broader community and help affected organizations to respond to this threat.

One of the latest additions to our platform, unveiled last week at Black Hat USA, is the integration of YARA rules. Part of this integration is a new Rule Playground designed to help platform users to develop YARA rules. In just a few minutes, organizations can scan their entire software portfolio using YARA rules, whether developed internally or sourced from the broader security community.

Conclusion

The xz-utils backdoor incident demonstrates that even short-lived malicious code can remain unnoticed in official container images for a long time, and that can propagate in the Docker ecosystem. The delay underscores how these artifacts may silently persist and propagate through CI pipelines and container ecosystems, reinforcing the critical need for continuous binary-level monitoring beyond simple version tracking.

What's lurking in your firmware?