Skip to main content

How does Docker prevent cross-repo layer caching attacks in registries?

Expert Docker
Quick Answer A malicious image could include a layer that's identical (same SHA256) to a popular base image layer. If the registry allowed shared layers across repos, one user could trick another into trusting modified content. Registries use per-repository blob storage and validate that layers belong to the repo that uploaded them.

Answer

Layer digests require repo-scoped authorization; knowing a digest is not enough to download.
S
SugharaIQ Editorial Team Verified Answer

This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.

Want to bookmark, take notes, or join discussions?

Sign in to access all features and personalize your learning experience.

Sign In Create Account

Source: SugharaIQ

Ready to level up? Start Practice