Is port 2375 (Docker API) exposed to the internet without TLS?
AdminKit explains why an exposed port 2375 is one of the worst findings a check can return: it's IANA's registered port for the Docker Engine API in plain text, and Docker's daemon runs as root and can mount the host filesystem — so a reachable, unauthenticated API there is equivalent to an unauthenticated root shell.
By AdminKit team, Netbase JSC · Updated
Key takeaways
- Port 2375 is the Docker Engine API without TLS. Port 2376 is the same API with TLS. The daemon uses neither by default; it listens on a local Unix socket.
- Anyone who can reach an unauthenticated 2375 can start a privileged container that mounts the host’s filesystem, which amounts to root on the host.
- Docker’s own documentation has deprecated unauthenticated TCP listeners and recommends TLS client certificates or SSH for remote access.
- AdminKit’s port check does not test 2375. Check it manually from outside your network, then find which setting opened it.
Why is an open Docker API as bad as it sounds?
IANA registers port 2375/tcp as the registered port for the Docker Remote API in plain text. Docker’s own documentation on protecting the daemon socket explains that the daemon normally communicates over a non-networked Unix socket, and only optionally over SSH or a TLS-secured TCP socket — plain, unauthenticated TCP was never the intended production configuration. The reason this matters so much more than a typical exposed service is privilege: the Docker daemon runs as root, and its API can be told to start a container with the host’s own root filesystem mounted inside it. A single API call that most people would consider routine container management is, with no authentication in front of it, equivalent to handing out an unauthenticated root shell on the entire host.
Who is actually looking for an open port 2375?
This is not a theoretical attack chain. The Hacker News reported on a 2024 malware campaign that specifically scans the internet for Docker hosts with the API exposed on port 2375, then uses the access to deploy cryptocurrency-mining payloads at scale. Security researchers have separately documented the Kinsing malware family running the same pattern for years: find an exposed Docker (or Redis) instance, use it to run an attacker-controlled container, and deploy a cryptominer. Some campaigns go a step further once they’ve compromised a host — they add a cron job that uses the host’s own firewall tools to close port 2375 behind them, locking out both the original administrator’s oversight and any competing attacker scanning for the same opening.
How do you check your own exposure?
AdminKit’s open ports check checks a fixed nine-port list, and port 2375 isn’t on it — confirm this one manually with a TCP-aware check such as nc -vz your-public-ip 2375 run from outside your network, after confirming your public IP with what is my IP. Because this single exposure is equivalent to full host compromise rather than a partial one, confirming it directly is worth prioritizing over most other port checks on this list.
How does port 2375 get opened in the first place?
A fresh Docker Engine install does not listen on the network. The daemon accepts API calls on the Unix socket /var/run/docker.sock, and only users who can write to that socket can control it. Port 2375 appears only when someone tells the daemon to also listen on TCP. The usual ways:
| Where the setting lives | What it looks like |
|---|---|
/etc/docker/daemon.json | "hosts": ["unix:///var/run/docker.sock", "tcp://0.0.0.0:2375"] |
A systemd override for docker.service | ExecStart=/usr/bin/dockerd -H fd:// -H tcp://0.0.0.0:2375 |
| Older tutorials and CI setups | Remote builds or a management UI on another machine, configured once and forgotten |
| Docker Desktop | The “Expose daemon on tcp://localhost:2375 without TLS” setting, which binds to localhost only |
The address matters. tcp://127.0.0.1:2375 is reachable only from the host itself. tcp://0.0.0.0:2375 listens on every interface, and on a cloud VM or a server with a forwarded port that means the internet.
Docker has moved against this configuration. Its deprecation notes list unauthenticated TCP connections as deprecated since Engine v26.0, state that listening on a TCP address other than localhost will require TLS verification, and say that from v27.0 the daemon refuses to start if TLS is explicitly turned off while remote TCP connections are configured. Hosts on older engines, or with configurations carried forward from them, are the ones still found on 2375.
What can someone do with the API?
The Engine API is the same interface the docker command uses. There is no separate login: whoever reaches the socket is an administrator. Docker’s security documentation puts it directly: only trusted users should be allowed to control the daemon, because it can share any host directory with a container without limiting its access rights.
In practice, an attacker with network access to 2375 can:
- List every container, image, volume and network, and read container environment variables, where database passwords and API tokens often live.
- Start a new container with the host’s root filesystem mounted inside it, which gives read and write access to every file on the host.
- Run that container privileged or in the host’s namespaces, which removes the remaining isolation.
- Pull any image from a public registry and run it, which is how the cryptocurrency-mining campaigns cited on this page deploy their payload.
None of this requires a vulnerability. The API is doing exactly what it is designed to do for the wrong caller, and every step can be scripted, so the time from discovery to compromise can be very short.
How do you confirm the API from your own host?
The Engine API answers plain HTTP, so curl against the local address shows whether the TCP listener is active. Example output, abridged and illustrative:
$ curl -s http://127.0.0.1:2375/version
{"Version":"24.0.7","ApiVersion":"1.43","Os":"linux","Arch":"amd64", ...}
$ sudo ss -ltnp 'sport = :2375'
LISTEN 0 4096 *:2375 *:* users:(("dockerd",pid=812,fd=9))
A JSON reply means the API is open on that interface without authentication. Then find the setting: systemctl cat docker shows the unit file and any overrides, and /etc/docker/daemon.json holds the hosts list. Remember that both places can set hosts; the daemon refuses to start if they conflict, so remove the TCP entry from wherever it lives.
From outside the network, the manual test above tells you whether 2375 is reachable at all. If it is, assume the host may already be compromised: look for containers and images you did not create with docker ps -a and docker images, review recent daemon logs with journalctl -u docker, and check for unfamiliar processes and scheduled jobs on the host itself.
What should replace a plain TCP listener?
If a remote machine needs to control the daemon, Docker documents two supported paths in Protect the Docker daemon socket:
| Method | How it works | Port |
|---|---|---|
| SSH | DOCKER_HOST=ssh://user@host runs the client over an SSH connection to the socket | 22 |
| TLS with client certificates | The daemon runs with --tlsverify and accepts only clients holding a certificate signed by your CA | 2376 |
Both still need network restrictions; see is port 22 (SSH) exposed for the SSH side. For hosts where containers run untrusted workloads, Docker’s rootless mode runs the daemon as an unprivileged user, which limits what a compromised API can reach on the host.
Is port 2376 automatically safe?
No. Port 2376 is the convention for the TLS-protected API, but the port number does not prove that clients are authenticated. Docker’s Protect the Docker daemon socket page describes the daemon modes: with --tls alone the daemon encrypts the connection but accepts any client, while --tlsverify together with a CA certificate makes it accept only clients that present a certificate signed by that CA. A daemon on 2376 started with --tls and no verification gives an attacker the same control as plain 2375, just over an encrypted channel.
When you audit a host, read the actual daemon flags or daemon.json rather than trusting the port number. Look for tlsverify set to true and a tlscacert path. Then check who holds client certificates signed by that CA: anyone with a valid client certificate and network access to 2376 can do everything described above. Keep the CA key off the Docker host, issue one client certificate per person or system, and restrict 2376 at the firewall to the management addresses that need it.
How to fix it
- Stop exposing the Docker API over plain, unauthenticated TCP — if remote access is genuinely required, enable mandatory TLS with client-certificate verification as described in Docker’s own daemon-socket protection guide, or use SSH-based remote access instead.
- Check what’s actually listening with a command like
ss -tlnp | grep 2375on the host itself; it should not show a public address bound to that port. - Restrict access to the Docker API, however it’s configured, to a small set of trusted management hosts via a firewall rule — never a public, unrestricted address.
- Audit the host for signs of prior compromise if you find the port was open, including unfamiliar containers, cron jobs, or firewall rule changes you didn’t make.
Defensive use only
Every check this page links to is for assets you own or are explicitly authorized to test. Never scan, probe, or attempt to connect to a network or device you don’t control — AdminKit’s active checks only ever run against the IP making the request or an asset you’ve verified ownership of. See our Disclaimer and Acceptable Use Policy for the full terms. This check is part of AdminKit’s machine protocols cluster, which covers management APIs and network services that are safe by design only when they’re kept off the open internet.
This guide is general information, not a security audit of your specific network — see our disclaimer for what AdminKit's guidance does and does not commit to.
Frequently asked questions
How does a Docker API exposure turn into full root access?
The Docker daemon runs as root by default, and its API lets a caller create and start a container with arbitrary mounts, including the host's own root filesystem. A single unauthenticated API call can launch a container that mounts the host filesystem, then run a command inside it — which is equivalent to running that command directly as root on the host itself.
Is this actively exploited or a theoretical risk?
Actively and continuously exploited. Security researchers have documented multiple malware families, including Kinsing, scanning the internet specifically for Docker daemons with port 2375 open, using the exposure to deploy cryptomining payloads, and in some cases installing a cron job that closes the port afterward with the host's own firewall tools — to keep other attackers out of the host they've claimed.
Why would a Docker API ever be configured to listen on a public TCP port like this?
Usually through a single misconfigured startup flag, such as -H tcp://0.0.0.0:2375, added to allow remote management or automation and never scoped to a private interface or protected with TLS — the Docker API was designed around a trusted local Unix socket, not an open network port, and treating it like an ordinary web API is what creates the exposure.
What's the fastest fix if I find my own host's port 2375 open?
Stop exposing the Docker API over plain TCP immediately — require mandatory TLS client-certificate verification if remote access is genuinely needed, or switch to SSH-based remote access, and restrict the port to specific trusted management hosts with a firewall rule rather than leaving it open to any address.
Sources
- IANA Service Name and Transport Protocol Port Number Registry (2375/tcp = docker)
- Docker Docs — Protect the Docker Daemon Socket
- The Hacker News — New Malware Targets Exposed Docker APIs for Cryptocurrency Mining (Jun 2024)
- Docker Docs — Deprecated Engine features (unauthenticated TCP connections)
- Docker Docs — Docker Engine security: Docker daemon attack surface
- Docker Docs — Run the Docker daemon as a non-root user (rootless mode)
Want AdminKit to watch this for you?
Free checks tell you the state today. Protective DNS and monitoring tell you when it changes.
Talk to an expert
Huy Nguyen (David), Founder & CEO, Netbase JSC
Ask whether this fix applies to your setup, or get a second pair of eyes on your DNS and mail records.