Skip to content

Dependency confusion attack from looking for manifest in docker.io first #811

Description

This block of code assumes that any image name with only one slash in it cannot possibly be a fully qualified image name, and therefore prepends docker.io/ to the name.

Thus, if I specify a Dockerfile with

FROM artefact.example.com/my_image:1.2.3

then this CLI first looks for a manifest at docker.io/artefact.example.com/my_image:1.2.3.

This concerns me. It feels like an invitation to a dependency confusion attack. Someone could create an "artefact.example.com" organization on docker.io, publish a malicious image named "my_image:1.2.3", and this CLI would pull that instead of what I specified.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

info-neededIssue requires more information from poster

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions