What is TUF (The Update Framework)? Secure updates even with a compromised key
Learn TUF's roles (root, targets, snapshot, and timestamp), the attacks it prevents, how the client flow works, and where it shows up day to day: Sigstore, Notary, and package managers.
Kubernetes$ cosign initialize▍Every system that downloads updates makes a bet: that the file it received is the one the publisher meant to deliver. HTTPS protects the transport, and a signature with a single key protects the file, until the day that key leaks, a mirror is breached, or someone starts serving an old, vulnerable version that is correctly signed. TUF was designed for those scenarios: it assumes that something will be compromised and limits the damage.
You probably already use TUF without knowing it: it’s what distributes Sigstore’s root of trust when cosign verifies a keyless signature.
What TUF is
TUF (The Update Framework) is a specification, with reference implementations, for securing software update and distribution systems: package managers, application updaters, registries, and key distribution. It came out of academic research (NYU), and it isn’t a tool you install and you’re done; it’s a signed metadata model that your repository publishes and your client verifies.
It joined the CNCF in 2017, directly at the incubating level, and has been graduated since 2019, as of November 2026 (check the project page). The specification was at version 1.0.37 during this research. The best-known implementations are python-tuf (the reference), go-tuf, rust-tuf, and tuf-js.
What problem it solves
The specification explicitly lists the attacks a TUF client must defeat. The main ones:
| Attack | What the attacker tries | TUF’s defense |
|---|---|---|
| Arbitrary installation | Deliver any file in place of the legitimate one | Hash and length of each target in signed metadata |
| Rollback | Make the client go back to an old, vulnerable version | Version numbers that can never decrease |
| Indefinite freeze | Always serve the same metadata to hide updates | Expiration dates, short for timestamp |
| Fast-forward | Inflate version numbers to block legitimate updates | Key rotation through root, which discards old timestamp and snapshot |
| Mix-and-match | Combine metadata that never existed together | Snapshot pins the version of all targets metadata |
| Endless data | Flood the client with huge responses | Length limits for metadata and targets |
| Key compromise | Sign something malicious with a stolen key | Separate roles, thresholds, and key rotation through root |
| Malicious mirrors | A bad mirror prevents updates from good mirrors | Signed metadata doesn’t depend on where it was downloaded from |
How it works
TUF splits responsibilities into roles, each with its own keys and threshold (how many signatures are required):
| Role | File | Signs | Keys |
|---|---|---|---|
| Root | root.json |
The keys and thresholds of all top-level roles, including itself | Offline, kept with the utmost care |
| Targets | targets.json |
Hash, length, and extra data for each distributed file; can delegate paths to other roles | Usually offline |
| Delegated targets | <role>.json |
The targets for a subset of paths (a team, a package) | Owned by the delegatee |
| Snapshot | snapshot.json |
The version of all targets metadata | Can be offline |
| Timestamp | timestamp.json |
The version (and optionally the hash) of the current snapshot | Online, re-signs often and expires quickly |
The client starts with a trusted root.json, embedded in the application, and always follows the same order: root → timestamp → snapshot → targets. First it updates root (each new version must be signed by the keys of both the previous and the new version), then it downloads timestamp, which points to snapshot, which points to the targets versions, which finally give the file’s hash. Only then is the target download accepted.
The design explains its resilience: the online timestamp key is the most exposed, but with it an attacker can only delay updates for a short time. To deliver a malicious file, they would need the targets keys, which are kept offline, and changing keys requires root, with a threshold of several people.
Hands-on example
What the metadata looks like
A minimal targets.json (illustrative values, shortened hashes and signatures). Note that the signature covers only the signed object:
{
"signatures": [
{ "keyid": "4e77...b2d1", "sig": "a0c5...93ff" }
],
"signed": {
"_type": "targets",
"spec_version": "1.0.31",
"version": 42,
"expires": "2027-02-25T00:00:00Z",
"targets": {
"agent-linux-amd64.tar.gz": {
"length": 18734211,
"hashes": { "sha256": "c3d9...1a7e" },
"custom": { "channel": "stable" }
}
}
}
}
And timestamp.json, which expires in hours or days and points to the current snapshot version:
{
"signatures": [
{ "keyid": "8a1f...c6e0", "sig": "77be...0d42" }
],
"signed": {
"_type": "timestamp",
"spec_version": "1.0.31",
"version": 10577,
"expires": "2026-11-26T03:00:00Z",
"meta": {
"snapshot.json": { "version": 318 }
}
}
}
A client with python-tuf
python-tuf’s ngclient runs the whole verification flow. Code follows the official documentation (syntax checked locally, not run against a real repository):
from pathlib import Path
from tuf.ngclient import Updater
trusted_root = Path("root.json").read_bytes() # shipped with the app
updater = Updater(
metadata_dir="/var/lib/agent/tuf",
metadata_base_url="https://updates.example.com/metadata/",
target_dir="/var/lib/agent/downloads",
target_base_url="https://updates.example.com/targets/",
bootstrap=trusted_root,
)
updater.refresh() # root -> timestamp -> snapshot -> targets
info = updater.get_targetinfo("agent-linux-amd64.tar.gz")
if info is None:
raise SystemExit("target missing from signed metadata")
path = updater.find_cached_target(info) or updater.download_target(info)
print("verified file at", path)
If the hash, length, version, or expiration of any metadata doesn’t check out, refresh() or download_target() raises an exception, and nothing gets installed.
Where TUF shows up
- Sigstore: Sigstore’s root of trust (Fulcio certificates, Rekor keys) is distributed through a TUF repository, created in a public signing ceremony and maintained by a rotation of keyholders from companies and academic institutions.
cosignships with an embedded root;cosign initializerefreshes that cache and, with--mirrorand--root, points to a private Sigstore instance. Commands follow the official documentation; signing details are in Cosign, SBOM, and SLSA. - Notary: the original Notary (v1), the basis of Docker Content Trust and of Harbor’s former content trust, is a TUF implementation. Note: Notation, the Notary Project’s current tool (incubating in the CNCF), uses a different model, with OCI signatures and trust policies, and doesn’t depend on TUF.
- Package managers and updaters: TUF’s adoptions page lists, among others, Bottlerocket (AWS), Datadog (agent integrations, combining TUF and in-toto), Fuchsia, and Kolide. Ongoing adoptions include PyPI (PEP 458), OPAM, Hackage, PHP, and mamba.
- Automotive: Uptane is a standard derived from TUF for vehicle updates.
When to use it (and when not to)
- Use it when you distribute software or data to many clients that update themselves: agents, CLIs, firmware, plugins, trust keys.
- Use it when compromise of a key or a mirror is a real risk and you need key rotation without reinstalling clients.
- You don’t need to implement it if you only consume container images: digest-based signing with Cosign and admission policies, as in container image supply chain on Kubernetes, cover that case, and TUF is already underneath Sigstore.
- Don’t underestimate operations: key ceremonies, offline storage, and periodic timestamp re-signing are processes, not just code.
Alternatives
| Approach | Protects against | Limits |
|---|---|---|
| HTTPS + checksum published on the same server | Corruption in transit | A breached server swaps file and checksum together |
| GPG-signed repository (APT, YUM) | Tampered file | One central key; limited protection against freeze and rollback |
| Cosign/Sigstore | Artifact without verifiable origin | Signs artifacts, doesn’t define the update protocol |
| Notation | OCI images without a trusted signature | Focused on OCI registries |
| TUF | The attacks in the table above, including key compromise | Requires running keys and roles |
Summary
- TUF is a CNCF graduated specification, as of November 2026, for secure update systems
- Root, targets, snapshot, and timestamp split responsibilities and keys
- The client always follows root → timestamp → snapshot → targets
- Short timestamp expiration detects freezes; increasing versions prevent rollback
- Thresholds and offline keys limit the damage of a stolen key
- Sigstore distributes its root of trust via TUF; Notation doesn’t use TUF
TUF doesn’t promise that nothing will be breached; it promises that one breach alone isn’t enough to ship malicious code.