Finding TCP port 2375 open on a Docker host tells you that the Docker Engine’s unencrypted REST API is reachable, which almost always means remote control of that host is possible without TLS. It cannot tell you who left it open, whether the host has already been compromised, or what containers and data are on it—you must probe further to learn those things. This article explains what port 2375 is, how it works, what an open port does and does not prove, and how to respond safely.
Background: Why Port 2375 Exists
Docker Engine exposes a REST API on TCP port 2375 when you start the daemon with the -H tcp://0.0.0.0:2375 flag or set DOCKER_OPTS accordingly. This is the unencrypted, unauthenticated endpoint that lets tools like the Docker CLI or curl talk to the daemon remotely. The port is not enabled by default; you must explicitly configure it. The companion port 2376 is the TLS-encrypted version.
Because the API has no built-in authentication, anyone who can reach port 2375 can issue commands as if they were the root user on the host. That includes pulling images, starting containers, and—critically—mounting the host’s filesystem into a container, which effectively gives full host access.
How the API Works
The Docker API is HTTP-based. A simple request like curl http://host:2375/containers/json returns a list of running containers. More dangerous endpoints include /containers/create and /containers/{id}/start. An attacker can create a container with "Binds": ["/:/host"] and then read or write any file on the host, including SSH keys and password hashes.
The API also exposes /info (system information), /images (list of images), and /events (stream of daemon events). None of these require a token or password. The only barrier is network reachability—if the port is firewalled to the internet but open on a local network, the risk is lower but still present.
What an Open Port 2375 Can Tell You
- Remote control is possible. The API is unauthenticated, so anyone who can connect can execute Docker commands.
- The host is misconfigured. Someone deliberately enabled the TCP listener without TLS, or a startup script did it by default.
- Potential for full compromise. Because of the host-mount trick, an attacker can escalate to root on the host, not just inside containers.
- Your network exposure. If the port is reachable from the internet, the host is exposed to the entire world; if only on a LAN, the risk is limited to local devices.
What It Cannot Tell You
- Who opened it. Could be a developer for convenience, a misconfigured CI/CD pipeline, or a malicious insider.
- Whether it has been exploited. An open port does not mean an attack has happened; you need to check logs, running containers, and filesystem changes.
- What data is inside. The port itself reveals nothing about the containers’ contents, databases, or secrets.
- How long it has been open. Unless you have historical scans, you cannot know the exposure duration.
- Whether TLS is also available. Port 2375 is unencrypted; 2376 is the TLS one. Seeing 2375 open does not tell you if 2376 is also open or properly configured.
Common Problems and Misconceptions
A frequent mistake is assuming that because port 2375 is open, the host is already hacked. That is not necessarily true—it is a vulnerability, not a guarantee of compromise. Another misconception is that Docker’s API is safe on a local network. Any device on that network, including IoT devices, can reach it. Some people also think that setting DOCKER_HOST to a remote address is enough to secure the connection—but without TLS, the traffic is plaintext and unauthenticated.
Another issue: some Docker versions bind to 0.0.0.0 by default when you specify a TCP socket, which exposes the API on all interfaces. If you meant to bind to localhost only, you must use 127.0.0.1:2375 explicitly.
How to Respond Safely
If you find port 2375 open on a system you manage, act immediately:
- Disconnect the host from the network or block the port in the firewall to stop further exposure.
- Change all credentials that could be accessed from the host—SSH keys, database passwords, cloud API tokens.
- Inspect running containers for suspicious mounts or images. Look for containers with
"Binds": ["/:/host"]. - Check system logs for unusual API calls or container creations around the time the port was opened.
- Reconfigure Docker to use TLS (port 2376) or bind to a trusted interface only.
- Consider a full reinstall if you find evidence of compromise—backdoors can be subtle.
If you are a security researcher who found the port on a third-party host, do not attempt to exploit it. Report it responsibly to the owner if possible.
Alternatives to Port 2375
For secure remote Docker management, use TLS with client certificates on port 2376. Tools like Docker Context and Docker Compose support this. Another option is to use SSH tunneling: docker -H ssh://user@host works without exposing any TCP port. For production, consider using orchestration platforms like Kubernetes or Docker Swarm, which handle authentication and encryption at a higher level.
Frequently Asked Questions
Is port 2375 always insecure?
Yes, by default it is unencrypted and unauthenticated. There is no way to make it secure without adding TLS or a proxy that requires authentication. The official Docker documentation recommends using TLS for any remote access.
Can I just close the port and be safe?
Closing the port stops new connections, but if an attacker already exploited it, they may have left backdoors. Always inspect the system thoroughly before assuming it is safe.
How do I check if my own Docker host has port 2375 open?
Run netstat -tulpn | grep 2375 on the host, or use a port scanner like Nmap from another machine. If the port is listening, check your Docker daemon configuration for -H tcp:// flags.
What is the difference between port 2375 and 2376?
Port 2375 is the plain HTTP Docker API; port 2376 is the TLS-encrypted version. Always use 2376 for remote connections, and never expose 2375 to untrusted networks.
Can a container escape via the Docker API?
Yes, with the right API calls an attacker can create a container with host filesystem mounts, which is effectively a container escape because it gives full host access. This is a well-known technique.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- Affordable Family Sedan: Quietly Reliable?
- Binge-Worthy Paramount Shows to Finish in One Sitting
- Affordable Pickup Trucks: Top Picks & Costs28,554 USD
- Halloween Desk Accessories: Spooky Picks
- Capture Cards: What They Do & How to Use Them
- Coupe High Octane Fun Sedan? Truth vs Hype