Summary
A logic flaw in the deletion and caching of blob descriptors in Distribution can unintentionally restore read access to blobs that were explicitly deleted.
When certain caching and deletion settings are enabled together, a blob removed from one repository may become readable again through cross-repository cache repopulation.
Affected context
This vulnerability affects deployments of Distribution that:
- Use blob descriptor caching via
storage.cache.blobdescriptor: redis - Have blob deletion enabled via
storage.delete.enabled: true - Host multiple repositories that may reference the same blob digest
In these configurations, a blob explicitly deleted (and expected to remain unreadable) from one repository can be made readable again if another repository still has a reference to the same blob and later accesses it.
Exploit preconditions
- Attack surface: Distribution registry API (e.g., Docker Registry HTTP endpoints).
- Required access: Ability to:
- Delete blobs (or manifests that imply blob removal) in one repository; and
- Read or trigger access to the same blob via another repository (repo with remaining references).
- Trigger point: A delete operation is performed on a blob in repository A, followed by a
StatorGetrequest for the same digest from repository B. - Why exploitation is possible: The delete path clears the shared digest descriptor in Redis but does not clean up repository-scoped membership data. Subsequent access from a second repository repopulates the shared descriptor, effectively restoring read access to the blob from the first repository despite the prior delete.
Why this happens
The root cause lies in incomplete cleanup of authorization and membership metadata during blob deletion. When a blob is deleted from a repository, Distribution clears the shared digest descriptor in the Redis cache but leaves stale repository-specific membership records intact.
Because these repo-scoped memberships are not synchronized with the shared cache invalidation, a later request from a different repository that still references the blob can repopulate the shared descriptor. This is a form of Improper Access Control (CWE-284), where the system fails to reliably enforce a delete decision over time and across repositories, allowing access policies to be bypassed by leveraging cached state and cross-repo references rather than direct privilege escalation.
Potential impact
- Deleted container images or blobs may become readable again from repositories where they were explicitly removed.
- Retention, legal hold, or cleanup policies can be undermined, leading to unexpected data persistence.
- Sensitive image layers that operators believe to be removed may remain accessible to users with read access to affected repositories.
- Operational assumptions about "hard deletes" and storage reclamation can be invalidated, complicating compliance and incident response.
General mitigation guidance
Mitigation generally focuses on ensuring that deletion semantics and access control remain consistent across repositories and caches:
- Align blob deletion logic with all associated metadata layers: ensure that when a blob is deleted, both shared cache entries and all repository-scoped memberships/associations are invalidated in a single, atomic workflow.
- Design cache layers so that authorization information and object membership are not the sole source of truth for whether content is still valid; the storage backend and deletion policies should be authoritative.
- Prefer configurations and patterns where delete operations either:
- Guarantee strong, consistent invalidation across distributed caches; or
- Fall back to soft-delete models with explicit policy-based cleanup that accounts for cross-repository references.
- Employ least-privilege access to repositories to limit which users or automation can delete or reaccess content, reducing the practical impact of stale membership entries.
- Treat multi-repository references and deduplication mechanisms as part of the access-control design, ensuring that deletion rules are defined at both blob and repository levels and are honored consistently.
How teams detect issues like this
Detection strategies can focus on both configuration and behavior:
- Configuration review:
- Flag registry instances that simultaneously enable
storage.cache.blobdescriptor: redisandstorage.delete.enabled: true, especially in multi-repository environments sharing content. - Behavioral monitoring:
- Log and correlate delete operations with subsequent successful reads of the same blob digest from the same repository.
- Build alerts when a digest marked as deleted from a given repository is later served to clients of that repository.
- Code and design review:
- Examine deletion flows to ensure they remove or invalidate all related cache entries and repo-scoped memberships.
- Review use of shared caches (e.g., Redis) for any paths where authorization or membership checks depend on potentially stale cached descriptors.
- Automated tooling:
- Use policy-as-code tools to enforce safe registry configurations in deployment pipelines.
- Apply static analysis or custom checks to registry code or configuration templates to highlight risky combinations of caching and delete settings.

