Skip to content
Pwnversity
AUD-REDISintermediate · 9 min · upd. 2026-11

Auditing Redis

RedisACLcaché

Redis was designed to live on a trusted network: the default user has no password and can run any command. That includes changing the configuration, wiping all data with FLUSHALL or loading Lua code into the server. The default defenses are two: listening only on localhost, and protected mode. Any deployment that removes them without setting up ACLs leaves the server in the hands of whoever reaches the port, from the internet or through an SSRF in the application (see SSRF). The audit reviews how the server is reached, who gets in and which commands each user is allowed.

On a self-managed Redis, everything belongs to the customer. On managed services (ElastiCache, Memorystore, Azure Cache, Redis Cloud), the provider runs the server and applies patches, but the customer decides:

  • the network it is reached from (VPC, security rules, private endpoints);
  • whether authentication and TLS are required;
  • which users and permissions exist, on services that support ACLs.
flowchart LR
    A["Application"] -->|"TLS + ACL user"| R(("Redis"))
    S["SSRF in the web app"] -. "gopher://, dict://<br/>to 6379" .-> R
    X["Internet"] -. "bound to every interface<br/>protected-mode no" .-> R
    R --> D["default user<br/>nopass +@all"]
    R --> U["app user<br/>~app:* +@read +@write<br/>-@dangerous -@scripting"]
    D -->|"CONFIG, FLUSHALL,<br/>EVAL, FUNCTION LOAD"| P["Control of the server"]
Setting What it does What to look for
bind Interfaces it listens on Every interface (* or 0.0.0.0) on a reachable server
protected-mode If default has no password, only accepts loopback connections no, very common in containers and “how to make it work” guides
port / tls-port Clear-text port and TLS port port other than 0 when all traffic should be encrypted

The lab shows it with Redis 7.0.15 (Ubuntu 24.04 package), started without a password and also listening on the machine’s IP address:

--- from loopback
protected-mode
yes
--- from 192.0.2.2
DENIED Redis is running in protected mode because protected mode is enabled and no password is set
for the default user. In this mode connections are only accepted from the loopback interface. ...

With CONFIG SET protected-mode no, the same connection gets in without credentials:

$ redis-cli -h 192.0.2.2 -p 16379 ACL WHOAMI
default
$ redis-cli -h 192.0.2.2 -p 16379 CONFIG GET dir
dir
/home/claude/lab-t4/redis
$ redis-cli -h 192.0.2.2 -p 16379 ACL LIST
user default on nopass ~* &* +@all

nopass ~* &* +@all is the finding: no password, every key, every channel and every command. With CONFIG available, an attacker can change the directory and dump file to write wherever the process user can. It is the classic technique for abusing exposed Redis servers.

Since Redis 6, users have permissions by command or category (+@read, -@dangerous), by key pattern (~app:*) and by channel (&app:*). The lab’s secure configuration:

user default off
user admin on >AdminLarga-2026-xyz ~* &* +@all
user app on >AppLarga-2026-xyz ~app:* &app:* +@read +@write +@connection -@dangerous
user monitor on >MonLarga-2026-xyz -@all +info +ping +slowlog|get +latency|latest

Real results, over TLS and connecting from the machine’s IP address (each command, followed by its response):

--- without credentials
NOAUTH Authentication required.
--- app
SET app:pedido:1 ok -> OK
SET otra:clave x -> NOPERM this user has no permissions to access one of the keys used as arguments
CONFIG GET dir -> NOPERM this user has no permissions to run the 'config|get' command
FLUSHALL -> NOPERM this user has no permissions to run the 'flushall' command
--- without TLS
Could not connect to Redis at 192.0.2.2:16379: Connection refused

ACL DRYRUN checks a permission without running the command, and ACL LOG records every denied attempt with the user, the command or key and the source address. Both are useful in an audit.

Other settings to review:

  • enable-debug-command, enable-module-command and enable-protected-configs set to no (the default in Redis 7; the lab confirms it with CONFIG GET);
  • rename-command, which still exists, but ACLs are the current way to remove commands;
  • aclfile with restrictive file permissions, because it holds the password hashes;
  • requirepass, which only sets a password for the default user and does not restrict commands.

CVE-2025-49844 (RediShell), found by Wiz and fixed on October 3, 2025, is a use-after-free in the Lua interpreter:

  • A crafted Lua script escapes the sandbox and runs code on the system.
  • It affects every version with Lua.
  • The fixed versions are 6.2.20, 7.2.11, 7.4.6, 8.0.4 and 8.2.2.
  • It requires authentication. That is why configuration sets the real risk: Wiz counted about 330,000 instances on the internet, around 60,000 without authentication.

For the audit, every user who can run EVAL or FUNCTION LOAD widens the attack surface. ACLs that take @scripting away from the application reduce the impact of this flaw and the next ones.

The lab reports redis_version:7.0.15. That version is not on the fixed list, but the Ubuntu package (5:7.0.15-1ubuntu0.24.04.5) includes the patch:

$ zcat /usr/share/doc/redis-server/changelog.Debian.gz | grep -n CVE-2025-49844
34: - debian/patches/CVE-2025-49844.patch: protect TString on stack
36: - CVE-2025-49844

Distributions backport patches to older versions. A scanner that only reads INFO server will report a false positive. The other way around, a container image built by hand with the same version would be vulnerable. Check where the binary comes from. The latest Redis Open Source release, as of November 21, 2026, is 8.10.3.

  • Port 6379 (and 16379 in clusters) reachable from where it should not be (see ports).
  • Response without credentials:
    • -DENIED means protected mode;
    • -NOAUTH means authentication is on;
    • a PONG to PING is a critical finding.
  • TLS: openssl s_client -connect host:6380 if there is a TLS port.
  • Leaked passwords: redis://user:password@host URLs in repositories and environment variables (see secrets management).
  • RediShell (October 2025). Described above. Wiz stressed that the problem was not just the flaw, but the tens of thousands of instances without authentication that let anyone send the script.
  • Campaigns against exposed Redis. Malware families such as P2PInfect, Redigo, HeadCrab and Migo have used exposed or unpatched instances to install cryptocurrency miners. They all start with a PING that gets a PONG without being asked for credentials.
  • bind limited to the interfaces needed; port not exposed to the internet or to networks without a need
  • protected-mode yes
  • default user disabled (user default off) or with a long password and minimal permissions
  • One user per application with ~prefix:*, +@read +@write, -@dangerous and -@scripting if it does not use Lua; result checked with ACL LIST and ACL DRYRUN
  • Monitoring user limited to INFO, PING and metric-reading commands
  • TLS on (tls-port) and port 0 if all traffic must be encrypted
  • enable-debug-command, enable-module-command and enable-protected-configs set to no
  • aclfile with restrictive permissions; passwords out of repositories and visible variables
  • ACL LOG reviewed or exported; alerts on denied commands
  • A version with the CVE-2025-49844 fix, confirmed through the package changelog or the binary’s origin