Docker Engine API Exposed Without Authentication
The Docker Engine API is reachable over the network without authentication, so anyone who can reach it can run containers on the host and gain root on it.
| Severity | Critical |
| CVSS 3.1 | 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H Open in the calculator |
| CVSS 4.0 | 9.3 CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N Open in the calculator |
| CWE | CWE-306: Missing Authentication for Critical Function |
| OWASP Top 10 | A07:2025 Authentication Failures |
| MITRE ATT&CK | T1133 External Remote Services, T1610 Deploy Container, T1611 Escape to Host |
| Category | Broken Access Control |
Description
The Docker daemon can be configured to accept API requests over TCP, with a -H tcp:// option for dockerd or a hosts entry in its configuration. Unless it is also configured for mutual TLS, the API on that port requires no authentication, and without TLS it is not encrypted either. Docker's current documentation says that exposing the API over HTTP without TLS is no longer permitted and stops the daemon at startup; older releases accept it. By convention, port 2375 is used for the unprotected API and port 2376 for the TLS-protected one. The same weakness exists when TLS is enabled without client certificate verification (--tls without --tlsverify), because any client can then connect.
Anyone who can reach the port then has full control of the Docker daemon, which runs as root. They can list, stop and inspect containers, read their environment variables, logs and files, pull and run their own images, and start a privileged container with the host's root filesystem mounted, which gives them root on the host. Exposed Docker APIs are routinely found and abused by automated cryptomining campaigns, which use them to deploy cryptocurrency miners, and are also commonly used as a foothold into the wider network.
The exposure is confirmed by requesting /version or /info from the port, which return details of the engine and the host, or by pointing the Docker client at the port with its -H option and listing containers. Network scanners and internet search engines identify the service from these responses.
Remediation
- Stop the daemon listening on TCP unless remote access is genuinely required: remove the
tcp://entries from its-Hoptions and fromhostsin/etc/docker/daemon.json, so that it listens only on its local Unix socket. - Where remote access is needed, use the Docker client's SSH transport (a
DOCKER_HOSTvalue beginningssh://), or configure mutual TLS with--tlsverify,--tlscacert,--tlscertand--tlskey, so that only clients holding a certificate from a dedicated certificate authority are accepted. Treat those client certificates as root credentials for the host. - Restrict the port with a host or network firewall to the management hosts that need it.
- If the port has been reachable from an untrusted network, check the host for signs of compromise, such as unknown containers, images, users or scheduled tasks.
Confirm the fix by checking from another host that port 2375 is closed and that port 2376, if used, refuses clients that do not present a valid certificate.
References
Add This Finding to Your Library
In Pental this write-up is in Settings, Library. Add to my library copies it into your own, rated in your firm's CVSS version, ready to put in your own words.
Free trialYour trial starts when your portal goes live, not when you sign up, so the time you spend setting up does not count. · No card required
Only need the reporting? Our reporting tool is free and open source, with the same library.