Bug 1732418 (CVE-2019-13509)

Summary: CVE-2019-13509 docker: Docker Engine in debug mode may sometimes add secrets to the debug log leading to information disclosure
Product: [Other] Security Response Reporter: Marian Rehak <mrehak>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: adimania, admiller, aileenc, amurdaca, andreas.bierfert, chazlett, dbecker, dornelas, drieden, dwalsh, fkluknav, frantisek.kluknavsky, ggaughan, ichavero, janstey, jcajka, jjoyce, jochrist, jschluet, kbasil, lhh, lpeer, lsm5, marianne, mburns, nalin, santiago, sclewis, slinaber, vbatts
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On: 1732420, 1748835, 1732419    
Bug Blocks: 1732421    

Description Marian Rehak 2019-07-23 10:51:22 UTC
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:


Comment 1 Marian Rehak 2019-07-23 10:51:43 UTC
Created docker tracking bugs for this issue:

Affects: epel-6 [bug 1732420]
Affects: fedora-all [bug 1732419]

Comment 4 Riccardo Schirone 2019-09-03 17:53:04 UTC
Upstream patch in the projectatomic/docker repository:

Comment 6 Riccardo Schirone 2019-09-04 08:56:24 UTC

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.

Comment 7 Riccardo Schirone 2019-09-04 09:14:27 UTC
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.