On March 29, 2024, Andres Freund reported a backdoor in xz/liblzma after investigating slow SSH activity, excess CPU use, and Valgrind errors. His comparison showed a failed SSH login taking 0.299 seconds before and 0.807 seconds after. Roughly half a second. The compression command was not the thing running slowly.
OpenSSH did not directly depend on liblzma. On affected distributions, systemd-notification support brought libsystemd into the dependency chain, which in turn brought liblzma. The reported build conditions targeted particular x86-64 Linux packaging environments. Freund also noted that the affected versions were not yet widely integrated and mostly appeared in prerelease distributions. This was serious enough without granting the attacker every SSH server on Earth.
The XZ maintainer’s account identifies the affected release tarballs as 5.6.0 and 5.6.1, created and signed by Jia Tan. Obfuscated material lived in repository test files, but part of the trigger existed only in the distributed tarballs. Reputation, repository, release archive, build, loaded library. There were several places to look, and they did not all contain the same evidence.
Competent malice can look like a well-structured project with a sensible architecture and a completely reasonable stated purpose, with the one part that matters folded into the middle, easy to overlook among the honest code around it. The camouflage is not a disguise laid over the request. The camouflage is the request.
This is the failure mode to test in a model reviewer: a large, credible codebase encourages a judgment about the whole while the consequential operation receives too little attention. The project looks fine. The project is excellent, actually. That is the design. The dangerous primitive gets its cover not from being hidden but from being surrounded, buried in enough legitimate context that the average of the thing reads as benign and a reviewer staying at summary level misses the call that changes what the whole assembly is for.
Two amplifiers make it worse, and both have clean defensive answers.
The first is splitting. The request does not have to arrive whole. Recon here, a credential-shaped helper there, an execution primitive somewhere else, spread across conversations or files so no single view holds enough to alarm. Each fragment can look defensible in isolation. Its effect depends on the data, permissions, and destinations joined to it. The composition is the attack. The fragments are the alibi.
The second is familiarity of form. Some capabilities are dangerous and completely routine to build. Networked server architecture, process management, remote input and execution, these are the honest bones of countless legitimate systems, and a project requesting them in the fluent vocabulary of ordinary infrastructure work reads as ordinary infrastructure work. Intrusion operators have a term for the human version, living off the land, abusing legitimate tools already present so the activity can blend into normal work. MITRE ATT&CK documents trusted-binary proxy execution as one concrete mechanism; ordinary engineering vocabulary is not itself that technique. A request phrased in the native dialect of systems engineering can borrow that familiarity. The familiar words still do not establish permission. Fluency is cover.
So the defense cannot stop at the story. Inspect the individual operations, then follow the assembly. Where did the value originate. Which transformation touched it. Which principal can use it. Where does it go. A function touching authentication material needs a defined permission and channel whether it lives in an obvious attack tool or the fourteenth file of a credible application. The surrounding documentation cannot grant those permissions.
Inspecting every call independently is still not enough. A read can feed an encoder that feeds a transport wrapper in another file. The meaningful path crosses the file boundaries. My deterministic AST reviewer explicitly does not track those values across functions or modules. A clean result from that reviewer cannot answer this question.
Capability has a structure you can inspect. Legitimate cover, an embedded permission gap, and a requested operation can form a consequential path. That structure does not read the author’s mind. It gives the reviewer something firmer to examine than the confidence of the README.
In practice that argues for a few uncomfortable postures. Review primitives and their connections. Keep the capability assembled across separate requests in view, rather than granting a fresh clean slate to each innocuous-looking fragment. And refuse to let fluency function as trust. A request phrased in flawless, idiomatic engineering language is not evidence of benign intent. It is evidence of competence, which is neutral about direction.
The repository and the release disagree
The tarball-only trigger gives the review a very practical second target. I built a local archive comparator that reads regular files without extracting or executing them. It normalizes explicitly supplied archive roots, hashes file contents, and reports additions, removals, and changes.
The demo starts with 200 harmless Python modules and a README in both archives. The source root is project; the release root is project-1.0. Identical file bytes match despite that directory-name difference. The second release adds one inert m4/generated-fixture.m4 file containing a comment marker. The source still has 201 files. The release has 202. The result is review_required, with the added path and its hash.
With Python 3 and curl installed:
compare_dir="$(mktemp -d)"
curl -fL 'https://ghostintheprompt.com/research/release_tree_compare.py' -o "$compare_dir/release_tree_compare.py"
python3 "$compare_dir/release_tree_compare.py" --demo
The recorded output keeps the matching control beside the release-only addition. Twelve tests cover matching bytes under different roots, added/changed/removed files, normalized duplicate paths, traversal, links, wrong roots, size limits, empty or corrupt archives, the 200-module case, the command’s review exit status, and hashes bound to the captured archive bytes even if the disk file changes afterward.
An added generated file is not automatically malicious. It has to be explained and reviewed. The comparator does not inspect code semantics, compare archive permissions or ownership, verify signatures, or establish a reproducible build. It rejects links and unsupported entries for separate review and stops on inspection limits. No backdoored XZ archive, build script, or model was executed for this example.
For the model-review question, the next measurement remains a controlled comparison: identical functionality, different amounts of surrounding project context, and a recorded reviewer decision. This archive check addresses a different, concrete boundary: whether the file bytes being released match the snapshot being reviewed.
The XZ tarballs were signed. That did not make their contents safe. A contributor’s reputation cannot inspect a commit, and a reviewed repository cannot explain a release-only file nobody looked at. The primitive, the connections, and the thing that actually ships each need their turn under the light.
GhostInThePrompt.com // Good commits do not inspect the tarball for you.