zot Registry Unauthorized Deletion via Bearer Token Scope Mismatch
A logic flaw in zot registry's bearer authentication handler causes HTTP DELETE requests to be incorrectly mapped to the 'push' scope, allowing unauthorized deletion of image manifests and blobs by push-only clients.
CVE search metadata
CVE search record: CVE-2026-61833. Severity: high. CVSS: 8.1. KEV: no. Brief: zot Registry Unauthorized Deletion via Bearer Token Scope Mismatch. Brief link: https://feed.craftedsignal.io/briefs/2026-09-zot-unauthorized-deletion/
The zot container registry (versions prior to 2.1.18) contains a security vulnerability (CVE-2026-61833) in its bearer authentication implementation. The registry incorrectly collapses all non-GET/HEAD HTTP methods - including DELETE - into the "push" scope action. Furthermore, the DistSpecAuthzHandler middleware, which is designed to enforce granular action authorization, is explicitly bypassed for requests authenticated via bearer tokens.
As a result, any client holding a bearer token with only "push" permissions can successfully execute DELETE operations on manifests and blobs within the repository scope. This behavior violates the Docker Distribution Token Authentication Specification, which mandates that "delete" be treated as a distinct, privileged action. This flaw poses a significant risk to CI/CD pipelines where service tokens are intentionally scoped to prevent unauthorized modification or deletion of registry assets. An attacker with access to a push-only token can render container images unpullable or disrupt service availability by deleting critical image layers.
Attack Chain
- Attacker gains access to a bearer token scoped for
pullandpushactions (e.g., via compromised CI/CD pipeline credentials). - Attacker crafts an HTTP DELETE request targeting a specific image manifest or blob within the repository scope of the stolen token.
- The request is sent to the zot registry server with the
Authorization: Bearer <TOKEN>header. - The zot bearer authentication handler processes the request and maps the DELETE method to the "push" action due to the flawed logic in
pkg/api/authn.go. - The
DistSpecAuthzHandlermiddleware identifies the request as bearer-authenticated and initiates an early exit, bypassing granular permission verification for the "delete" action. - The
DeleteManifestorDeleteBlobroute handler receives the request and executes the deletion process