Skip to content
AdminKit

Is port 6379 (Redis) exposed to the internet without a password?

Port 6379 is Redis's default port, and Redis ships with no password required, assuming only trusted clients will ever reach it. A 2018 Imperva study found roughly 75% of internet-reachable Redis servers it scanned were already compromised. AdminKit's port-check tool automates nine exposure checks; 6379 isn't on that list, so here's how to check your exposure manually.

By AdminKit team, Netbase JSC · Updated

Key takeaways

  • Redis listens on port 6379 and, out of the box, asks for no password. Its own documentation says it is built for “trusted clients inside trusted environments”.
  • An exposed, password-less Redis is not just a data leak. Its configuration commands can be used to write files on the host, which is how attackers have planted SSH keys and miners.
  • Protected mode (Redis 3.2.0 and later) blocks outside clients only while Redis runs with no password and no explicit bind address. Change either setting and it no longer applies.
  • Fix it in layers: bind to a private or loopback address, require authentication (ACLs on Redis 6 and later), firewall the port, and use TLS if traffic crosses an untrusted network.

Why does Redis have no password by default?

Redis’s own security documentation is explicit that it’s “designed to be accessed by trusted clients inside trusted environments,” with the expectation that an application layer, not Redis itself, handles access control for untrusted users. That’s a reasonable default for a database meant to sit behind an application server on a private network — it stops being reasonable the moment the server running it gets a public IP and the firewall rule isn’t as restrictive as assumed. That trust assumption sits at the protocol level too: RESP, the wire format every Redis command travels over, has no authentication built into it at all, so a missing password check at the application layer leaves the connection wide open by design, not by accident.

Is an exposed Redis actually abused?

This isn’t a hypothetical risk. In a 2018 study, Imperva scanned internet-reachable Redis servers and found that roughly 75% of the open, unauthenticated instances it could reach were already infected with malware, with attackers repeatedly installing SSH keys on compromised servers for persistent later access — one specific malicious key was found on thousands of separate Redis installations across more than two years, indicating a long-running, automated campaign rather than a one-off attack. Since then, researchers at Censys and others have repeatedly found tens of thousands of unauthenticated Redis servers exposed at any given time, abused to deploy cryptomining malware using nothing more than Redis’s own built-in configuration and replication commands — no exploit required. Finding those exposed instances at scale is exactly the kind of internet-wide indexing Shodan and Censys do, distinct from AdminKit’s own self-service checks, which only ever test the one asset you’ve verified.

What can someone do with an open Redis port?

Redis has no separate “admin” connection. Any client that can send commands can send every command, unless authentication or ACLs say otherwise. On an unprotected instance that includes:

What the attacker sendsWhat it doesWhy it matters
KEYS, SCAN, GETLists and reads every keySession tokens, cached user data and API responses leak.
FLUSHALLDeletes the whole data setRedis’s own docs give this as the example of the damage one command can do.
CONFIG SET followed by SAVEChanges where Redis writes its data file, then writes itThe file can land in a path such as an SSH authorized_keys file, which is how keys end up planted on the host.
REPLICAOF / SLAVEOFMakes the instance copy data from a server the attacker runsUsed in the cryptomining campaigns to load attacker-supplied data and code.

None of these is a bug. They are normal Redis features that are only safe because the port is supposed to be private. That is also why fixing it means closing the port and adding authentication, not waiting for a patch.

How does a Redis server end up reachable from the internet?

Few teams decide to put Redis on the internet. It usually happens through one of a handful of routine changes:

  1. A cloud server with a public address. A VPS or cloud instance gets a public IP by default, and Redis is installed with bind widened to all interfaces so another server can reach it. If the provider’s firewall or security group allows 6379 from anywhere, the instance is exposed.
  2. Containers publishing the port. Running Redis in Docker with -p 6379:6379 publishes the port on every interface of the host. On many Linux setups Docker writes its own firewall rules for published ports, so a host firewall rule that blocks 6379 may not apply to the container.
  3. Protected mode switched off during troubleshooting. The protected-mode error tells administrators how to disable it. That fixes the “can’t connect” problem for the application server and opens the port to everyone else at the same time.
  4. A password added without the network change. Setting requirepass ends protected mode. If the bind address is still all interfaces, the instance is now exposed and protected only by that single password.

Each of these is a normal step on its own. The risk comes from the combination, which is why the check below tests the public address directly instead of reading redis.conf.

Exposure also turns packaging and software bugs into internet-facing ones. CVE-2022-0543, as recorded in NIST’s National Vulnerability Database, is a Debian-specific packaging issue that let Redis’s Lua scripting escape its sandbox and run code on the host, and CISA lists it in its Known Exploited Vulnerabilities catalog. Anyone who can reach an unauthenticated port 6379 can send Lua scripts with EVAL, so an exposed instance on an affected package was open to exactly that.

How do you check your own exposure?

AdminKit’s open ports check checks a fixed nine-port list, and port 6379 isn’t on it — confirm your public IP with what is my IP, then test the port manually from a machine outside your network with nc -vz -w 3 203.0.113.5 6379. Since Redis’s own protected mode default (added in version 3.2.0) only blocks non-loopback connections when no password is set and no bind address is configured, it’s worth confirming directly rather than assuming the default is still active on your instance.

Redis answers plain-text commands, so the same test can tell you what kind of protection is in place. Run it from a machine outside your network, against your own public IP only (the address below is a documentation placeholder):

$ printf 'PING\r\n' | nc -w 3 203.0.113.5 6379
+PONG
ReplyWhat it meansRisk
+PONGRedis is reachable and accepted a command with no password.Critical: anyone can read, delete or reconfigure it.
-NOAUTH Authentication required.Redis is reachable but requires a password.Still exposed to password guessing; close the port anyway.
-DENIED Redis is running in protected mode ...Protected mode is refusing outside clients.Safe for now, but one config change away from open.
Timeout or connection refusedNothing answered on 6379 from where you tested.Low, if you tested from outside your own network.

Inside the server, redis-cli CONFIG GET bind and redis-cli CONFIG GET protected-mode show what the running instance is actually using, which can differ from the file on disk if someone changed it at runtime.

How do you fix an exposed Redis?

  • Set a strong password using Redis’s AUTH mechanism or newer Access Control Lists — this alone stops the unauthenticated-connection pattern the Imperva and Censys research both describe.
  • Bind Redis to a private or loopback interface instead of all interfaces, so it isn’t reachable from outside your own network regardless of firewall rules.
  • Add an explicit firewall rule restricting port 6379 to only the application servers that need it.
  • If Redis traffic crosses a network you don’t control, turn on TLS (supported since Redis 6). Without it, the password and every command travel in clear text.

On Redis 6 and later, Access Control Lists are the better way to require a password. Instead of one shared requirepass, each application gets its own user with only the commands and keys it needs, and the unauthenticated default user can be switched off. A minimal redis.conf for a single application might look like this:

bind 127.0.0.1
protected-mode yes
user default off
user app on >use-a-long-random-password ~app:* +@read +@write -@dangerous

Here -@dangerous removes commands such as CONFIG, FLUSHALL and REPLICAOF from the application user, so a leaked application password can’t be used to rewrite the server’s configuration. On older versions, the documentation’s rename-command CONFIG "" setting disables a single command the same way.

See Open Redis and other unauthenticated databases: a quick exposure check for the full self-check walkthrough and why this same no-auth-by-default pattern shows up in other data stores too, including PostgreSQL and Elasticsearch when their own protections are left off, and in non-database services like an unauthenticated Docker API.

How do you keep it closed after the fix?

A one-time check only tells you about today. Redis exposure tends to come back when a server is rebuilt from an old image, when a container is redeployed with a different port mapping, or when someone relaxes a firewall rule to debug a connection problem. Two habits help: repeat the outside test after every infrastructure change that touches the Redis host, and keep the bind address, ACL users and firewall rule in the same configuration management or deployment files, so a rebuild puts all three back together.

Which servers may you test with these checks?

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.

RESP, the protocol behind Redis’s default-open posture, is one entry in AdminKit’s broader machine protocols cluster, which groups the network services and data-store protocols that keep turning up exposed with no authentication at all.

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

Does AdminKit's port-check tool scan port 6379?

No. The tool checks a fixed list of nine specific TCP ports (23, 554, 1883, 8883, 502, 7547, 80, 443, 8080) chosen for how often they turn up misconfigured on home and small-office devices — see the port-check tool page for the current list. 6379 isn't on that list, so confirm your own exposure with the manual check below.

Why does Redis ship without a password by default?

Redis's own documentation says it's "designed to be accessed by trusted clients inside trusted environments," expecting an application layer — not Redis itself — to handle access control for untrusted users.

Is this a theoretical risk or does it actually get exploited?

Documented and ongoing — a 2018 Imperva study found roughly 75% of open, unauthenticated Redis servers it scanned were already infected with malware, and researchers have continued finding tens of thousands of exposed instances since.

Doesn't Redis's 'protected mode' handle this automatically?

Partially — since version 3.2.0, Redis refuses non-loopback connections by default when no password is set, but an administrator can disable this, misconfigure the bind address, or set a password without realizing protected mode then stops applying.

What's the fastest fix if I find my own instance exposed?

Set a password with Redis's AUTH mechanism or newer Access Control Lists, bind Redis to a private or loopback interface, and add a firewall rule restricting the port — all three together, not just one.

Want AdminKit to watch this for you?

Free checks tell you the state today. Protective DNS and monitoring tell you when it changes.

Huy Nguyen (David), Founder and CEO of Netbase JSC

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.