Skip to content

Any php program in a linked container can read the mysql root password #21

@jlj

Description

@jlj

Note: this is a copy of a message about this issue that I wrote as a comment to docker issue #5169 (closed) see moby/moby#5169 (comment)

Although the docker documentation now clearly includes a warning about env variables being propagated to linked containers, this still looks like a real security problem to me, because many images, including official images pass secret information though env variables, and there still doesn't seem to be a good way to pass a private variable to a container at runtime.

This can be illustrated by a very simple php / mysql application using a database container,using the official mariadb image, linked with a php container based on the official php image.

The result is simply that any php program has access to the mysql root password via the env variables:
phpinfo

And really, this is not desirable!

Ok, this could be considered as a bug of the mariadb image and I will also enter it as such...
But my real feeling is that it looks more like a general docker issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions