zot: Bearer authentication maps DELETE to push scope, allowing unauthorized deletion
### Summary A bearer token with only `pull` and `push` scopes can successfully delete manifests and blobs from a zot registry. The bearer authentication handler maps all non-GET/HEAD HTTP methods, including DELETE, to the `"push"` action, and the `DistSpecAuthzHandler` middleware is bypassed entirely for bearer-authenticated requests. This allows any client holding a push-only bearer token to delete arbitrary manifests and blobs within the token's repository scope, in violation of the [Docker Distribution Token Authentication Specification](https://distribution.github.io/distribution/spec/auth/scope/). ### Details The vulnerability exists in two interacting components: **1. Action Mapping Collapse (`pkg/api/authn.go:571–586`)** The bearer authentication handler maps HTTP methods to token scope actions using a binary check: ```go action := "pull" if m := request.Method; m != http.MethodGet && m != http.MethodHead { action = "push" } ``` This collapses DELETE, PUT, PATCH, and POST into a single `"push"` action. The `"delete"` action is never assigned. **2. Authorization Bypass for Bearer Auth (`pkg/api/authz.go:270–275, 318–323`)** When a request is authenticated via bearer token, the `DistSpecAuthzHandler` middleware, which performs fine-grained action inference (distinguishing `create`, `read`, `update`, and `delete`) is bypassed entirely: ```go if err != nil || (authnMwCtx != nil && authnMwCtx.AuthnType == BEARER) { next.ServeHTTP(response, request) return } ``` **3. No Hand
GO-2026-6527
Revision 1
zot: Bearer authentication maps DELETE to push scope, allowing unauthorized deletion in zotregistry.dev/zot
zot: Bearer authentication maps DELETE to push scope, allowing unauthorized deletion in zotregistry.dev/zot
Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.
Security context
Source reference: osv:GO-2026-6527
zotregistry.dev/zot
Source reference: /affected/0/package/name
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
zotregistry.dev/zot/v2
Source reference: /affected/1/package/name
- Affected versions
- Not stated in this record
- Fixed versions
- 2.1.18
Source reference:
/affected/1/ranges - Prerequisites
- Not stated in this record
Structured affected-version data
Original package identities and version rules from this source.
[
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "zotregistry.dev/zot",
"purl": "pkg:golang/zotregistry.dev/zot",
"ecosystem": "Go"
},
"database_specific": {
"source": "https://vuln.go.dev/ID/GO-2026-6527.json"
},
"ecosystem_specific": {}
},
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "0"
},
{
"fixed": "2.1.18"
}
]
}
],
"package": {
"name": "zotregistry.dev/zot/v2",
"purl": "pkg:golang/zotregistry.dev/zot/v2",
"ecosystem": "Go"
},
"database_specific": {
"source": "https://vuln.go.dev/ID/GO-2026-6527.json"
},
"ecosystem_specific": {}
}
]- Related CVEs
- CVE-2026-61833
Source reference:
/aliases
Publisher severity
No explicit severity was provided.
- Event
- #23370 · Revision 1
- Added to Heist Feed
- Publisher date
GHSA-qg67-7m6v-qg25
Primary source · Revision 1
Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.
Security context
Source reference: osv:GHSA-qg67-7m6v-qg25
zotregistry.dev/zot/v2
Source reference: /affected/0/package/name
- Affected versions
- Not stated in this record
- Fixed versions
- 2.1.18
Source reference:
/affected/0/ranges - Prerequisites
- Not stated in this record
Structured affected-version data
Original package identities and version rules from this source.
[
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "0"
},
{
"fixed": "2.1.18"
}
]
}
],
"package": {
"name": "zotregistry.dev/zot/v2",
"purl": "pkg:golang/zotregistry.dev/zot/v2",
"ecosystem": "Go"
},
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-qg67-7m6v-qg25/GHSA-qg67-7m6v-qg25.json"
}
}
]- Related CVEs
- CVE-2026-61833
Source reference:
/aliases
Publisher severity
high
Source reference: /database_specific/severity
- Event
- #23399 · Revision 1
- Added to Heist Feed
- Publisher date