In Docker CE and EE before 18.09.8 (as well as Docker EE before 17.06.2-ee-23 and 18.x before 18.03.1-ee-10), Docker Engine in debug mode may sometimes add secrets to the debug log. This applies to a scenario where docker stack deploy is run to redeploy a stack that includes (non external) secrets. It potentially applies to other API users of the stack API if they resend the secret.
Created docker tracking bugs for this issue:
Affects: epel-6 [bug 1732420]
Affects: fedora-all [bug 1732419]
Upstream patch in the projectatomic/docker repository:
This issue does affect the versions of docker as shipped with Red Hat Enterprise Linux 7, however debug mode on the daemon needs to be explicitly enabled as the docker systemd service, by default, does not enable debug mode.
Red Hat Fuse provides only the Docker client library and is not affected by this vulnerability.
Function maskSecretKeys() in api/server/middleware/debug.go masks some sensitive data when logging them, by replacing the real content with a set of asterisk. However the "Data" field was not properly masked in all cases, thus allowing an attacker to possibly see those sensitive data in the docker daemon log.
Those logs should be anyway only visible by an administrator or an high-privileged user, but it may happen that a debug log is uploaded or shared when there is an issue and it is important to prevent secrets from leaking.