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. Upstream Issue: https://docs.docker.com/engine/release-notes/#180908
Created docker tracking bugs for this issue: Affects: epel-6 [bug 1732420] Affects: fedora-all [bug 1732419]
Upstream patches: https://github.com/moby/moby/commit/73db8c77bfb2d0cbdf71ce491f3d3e66c9dd5be6 https://github.com/moby/moby/commit/f8a0f26843bc5aff33cf9201b75bd4bdbb48a3ad
Upstream patch in the projectatomic/docker repository: https://github.com/projectatomic/docker/commit/47e2230740ce37f1f676d90fdae33c1b25e5315d
Statement: 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.