Описание
Distribution's tag deletion bypasses storage.delete.enabled configuration
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:
Start a local Distribution, mounting in the above configuration from the current directory:
In a separate terminal session/tab, push alpine:3.23 into the running instance:
Confirm that the tag shows up as expected:
Issue a delete for the 3.23 tag:
Observe that the tag is now gone, despite deletes being disabled:
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.
Пакеты
github.com/distribution/distribution/v3
< 3.1.1
3.1.1
github.com/distribution/distribution
<= 2.8.3
Отсутствует
Связанные уязвимости
Distribution is a toolkit to pack, ship, store, and deliver container content. Prior to 3.1.1, 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. This vulnerability is fixed in 3.1.1.
Distribution is a toolkit to pack, ship, store, and deliver container content. Prior to 3.1.1, 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. This vulnerability is fixed in 3.1.1.
Distribution is a toolkit to pack, ship, store, and deliver container content. Prior to 3.1.1, 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. This vulnerability is fixed in 3.1.1.
Distribution is a toolkit to pack, ship, store, and deliver container ...
Уязвимость инструментария для хранения и доставки содержимого контейнеров Distribution, связанная с недостатками механизма авторизации, позволяющая нарушителю получить несанкционированный доступ к защищаемой информации