Skip to content
Access control Write-up Advanced

Docker Desktop for Windows PrivEsc (CVE-2020-11492)

The Docker Desktop Service, running as SYSTEM, connects as a client to named pipes created by child processes. A lower-privilege process can create a malicious named pipe, impersonate the connecting SYSTEM account, and execute commands with SYSTEM privileges.

pentestpartners.com

Published on pentestpartners.com

Docker Desktop for Windows suffers from a privilege escalation vulnerability to SYSTEM. The core of the issue lies with the fact that the Docker Desktop Service, the primary Windows service for Docker, communicates as a client to child processes using named pipes.

PTP Admin, on pentestpartners.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The Docker Desktop Service opened named pipes as a client without disabling impersonation, allowing a malicious pipe server to impersonate the connecting SYSTEM account.

Impact

An attacker with low-privilege code execution could escalate to SYSTEM, gaining the highest level of privileges on the Windows machine.

What the attacker needed

Low-privilege code execution with impersonation privilege; Docker Desktop installed and running

The fix

The Docker Desktop Service was fixed to use the SecurityIdentification impersonation level when connecting to child process named pipes, preventing impersonation.

How it was found

  1. Obtain code execution under a low-privilege account that has the impersonation privilege (e.g., IIS AppPool).
  2. Create a named pipe called \\.\pipe\dockerLifecycleServer and wait for a connection.
  3. Start Docker Desktop so the Docker Desktop Service connects to the malicious pipe.
  4. Impersonate the connecting SYSTEM account and launch a new process using CreateProcessWithTokenW.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Docker Desktop runs a background service with the highest Windows privileges (SYSTEM). That service talks to other Docker processes using named pipes, a Windows way for programs to communicate. Because the service connects to these pipes as a client, a malicious program can set up a fake pipe, wait for the service to connect, and then pretend to be the service to run commands as SYSTEM.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.