zotregistry.dev/zot/v2
Affected
- introduced
0, fixed2.1.15(semver)
Fixed versions
2.1.15
Fix
- Fixed version
2.1.15go get zotregistry.dev/zot/[email protected]
Advisory
Also known as: CVE-2026-31801, GO-2026-4668
zot’s create-only policy allows overwrite attempts of existing latest tag (update permission not required)
zot’s dist-spec authorization middleware infers the required action for PUT /v2/{name}/manifests/{reference} as create by default, and only switches to update when the tag already exists and reference != "latest".
as a result, when latest already exists, a user who is allowed to create (but not allowed to update) can still pass the authorization check for an overwrite attempt of latest.
affected component
pkg/api/authz.go (DistSpecAuthzHandler)slices.Contains(tags, reference) && reference != "latest" (line 352 at the pinned commit)severity
HIGH
category: CWE-863 (incorrect authorization)
note: impact depends on how a deployment uses latest (for example, if latest is treated as a protected or “push-once” tag), and on how access control is provisioned (users with create but without update). the attached poc demonstrates a real overwrite of latest (tag digest changes) under a create-only policy.
steps to reproduce
attacker has create but not update on a repository.latest./v2/acme/app/manifests/latest (example repository name).create (not update) for latest, so the request passes authorization even though the tag already exists.the attached poc demonstrates this deterministically with canonical.log and control.log markers.
expected vs actual
update permission, including latest (or latest should be explicitly documented as exempt).reference=="latest" and the tag exists, the middleware keeps the action as create instead of switching to update.security impact
this can break least-privilege expectations in deployments that rely on the create vs update split to prevent tag overwrites (for example, “push-once” policies). if latest is used as a high-trust tag in ci/cd, this can create supply-chain risk because a create-only principal can overwrite an existing latest tag while other existing tags correctly require update.
suggested fix
remove the special-case exemption for latest when determining whether an existing tag requires update permission (treat latest the same as other tags), or document and enforce an explicit policy rule for latest.
notes / rationale
DistSpecAuthzHandler.latest is exempt, this control does not apply to latest unless documented otherwise.High Basis: The source's own band: HIGH
0, fixed 2.1.15 (semver)2.1.15
2.1.15go get zotregistry.dev/zot/[email protected]1.3.0-20210831063041-c8779d9e87d9, last affected 1.4.4-20251014054906-73eef25681af (semver)None listed
No fixed version is listed.
Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0