Résumé
ONYEDIKACHI BERNARDCLOUD · DEVSECOPS · AI
RésuméGet in touch
CASE 27CONTAINERS & KUBERNETES

Docker Engine TCP Socket Exposure

A Docker Engine was listening on TCP port 2375 without authentication, letting any host on the network list containers, pull images, and control the daemon. I confirmed the unauthenticated access and identified the controls to secure remote Docker management.

Status: ASSESSED · VERIFIED

DOMAIN
Containers & Kubernetes
PLATFORM
Docker Engine, TCP
SEVERITY
Critical
OUTCOME
Unauthenticated remote access confirmed

TOOLS

NmapcURLDocker CLIDocker EngineTCP SocketsLinuxDocker APIContainer Runtime
RESULT
BEFOREOpen TCP socket, no auth
AFTERExposure documented
01

Objective

I set out to assess whether a Docker Engine's TCP socket was exposed to the network and whether remote users could interact with the Docker daemon without authentication.

02

Scenario

A Docker host was configured to listen for remote management connections on TCP port 2375, the default Docker API port. I wanted to determine whether authentication or TLS was enforced, and what an unauthenticated user could do through the exposed API.

03

What I found

FINDING 01 (CRITICAL): DOCKER API ACCESSIBLE WITHOUT AUTHENTICATION

A port scan identified TCP 2375 as open, running Docker Engine 20.10.20. The API responded to unauthenticated requests, returning version information and accepting management commands.

port-scanOPEN API
Port:                2375/tcp (open)
Service:             Docker Engine 20.10.20
Authentication:      None
TLS:                 Not configured

FINDING 02 (CRITICAL): FULL REMOTE CONTROL OF THE DOCKER DAEMON

Through the unauthenticated API, I could list running containers, enumerate networks and images, and issue management commands. Any host that could reach port 2375 had full administrative control of the Docker Engine.

remote-accessFULL CONTROL
Containers:          Listed (running and stopped)
Networks:            Listed
Images:              Listed
Management commands: Accepted without credentials
04

What I did

  1. Scanned the target

    I used Nmap to identify the open Docker API on port 2375.

  2. Tested API access

    A cURL request to the /version endpoint returned Docker Engine details without authentication.

  3. Enumerated the daemon

    I used the Docker CLI with the remote host flag to list containers, networks, and images.

  4. Documented the exposure

    The daemon was fully controllable from any host on the network.

EVIDENCE

TEXT
# Remote Docker API assessment
Nmap:              Port 2375 open, Docker 20.10.20
cURL /version:     Responded without authentication
Docker CLI:        Listed containers, networks, images remotely
Access level:      Full Docker daemon administration
05

Validation

The Docker API responded to unauthenticated requests, and full management access was confirmed through the Docker CLI. Any network-reachable host could control the daemon.

06

Before and after

CONTROLBEFOREAFTER
TCP 2375Open, unauthenticatedExposure documented
TLS authenticationNot configuredRecommended: mutual TLS
Network accessAny host on networkRecommended: firewall to management hosts only
API authenticationNoneRecommended: TLS client certificates
Docker contextsNot usedRecommended: SSH-based remote management
07

What I recommend

  1. 01Disable the TCP socket and use SSH-based Docker contexts for remote management.
  2. 02If TCP is required, enforce mutual TLS authentication so only clients with valid certificates can connect.
  3. 03Restrict network access to the Docker API port using firewall rules, allowing only authorised management hosts.
  4. 04Monitor for unexpected connections to the Docker API port.
  5. 05Review Docker daemon configuration regularly for unintended network exposure.

“An exposed Docker TCP socket can turn a container management interface into a remotely accessible administrative surface, making network exposure and access control critical parts of Docker security.”

WHAT I LEARNED

SKILLS IT PROVES

  • Docker Security
  • Container Security
  • Network Security
  • Vulnerability Assessment
  • Network Enumeration
  • Service Enumeration
  • Docker Engine Administration
  • Docker API Security
  • Access Control
  • Network Segmentation
  • Infrastructure Security
View my labs on GitHub