Redis Without Authentication

A Redis server accepts commands without a password or access control list, letting anyone who can reach it read or change its data and often run code on the host.

SeverityCritical
CVSS 3.19.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H Open in the calculator
CVSS 4.09.3 CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N Open in the calculator
CWECWE-306: Missing Authentication for Critical Function
OWASP Top 10A07:2025 Authentication Failures
MITRE ATT&CKT1213.006 Databases, T1098.004 SSH Authorized Keys, T1053.003 Cron, T1485 Data Destruction
CategoryBroken Access Control

Description

The Redis server accepts commands from any client that connects, without requiring a password or an access control list (ACL) user. Redis is designed for trusted clients in trusted environments and has no authentication in its default configuration. Since version 3.2, protected mode restricts a password-less instance to local connections when it runs with the default settings, but it is commonly switched off, or does not apply to the configuration in use, so that application servers can connect.

Anyone who can reach the port can therefore read, change or delete all data in the instance, which commonly includes session data, cached application data, queued jobs and secrets, and can erase it with commands such as FLUSHALL. Where the CONFIG command is available, an attacker can also change the working directory and dump file name to write files on the server as the Redis service account, for example an SSH authorized_keys file, a cron entry or a web shell, and on some versions can load a malicious module. This often gives command execution on the host, although the impact is reduced where Redis runs as a dedicated unprivileged account, where dangerous commands are blocked through ACLs, and where newer releases' protections against changing sensitive settings at runtime are left enabled.

The issue is confirmed by connecting to the service, normally on TCP 6379, with redis-cli or a raw TCP connection and running commands such as INFO or KEYS without authenticating. An instance that requires authentication answers with an authentication error instead. Scanners report the issue as Redis unauthenticated access, often with the server version and configuration returned by INFO.

Remediation

Require authentication and restrict network access:

  • Configure ACL users (Redis 6 and later) with strong passwords and only the commands and key patterns each application needs, and disable the default user or give it a strong password. On older versions, set a long random requirepass value.
  • Deny dangerous commands such as CONFIG, MODULE, DEBUG, FLUSHALL and FLUSHDB to application users through ACL rules.
  • Bind Redis to the loopback address or a specific internal interface with the bind directive, keep protected-mode yes, and restrict TCP 6379 with firewall rules to the application servers that use it.
  • Run Redis as a dedicated unprivileged account, and enable TLS where traffic crosses untrusted networks.
# redis.conf (Redis 6 and later) bind 127.0.0.1 protected-mode yes user default off user app on >use-a-long-random-password ~app:* +@read +@write -@dangerous

Rotate any secrets held in the instance and check the host for files Redis may have been used to write. Confirm the fix by connecting without credentials and checking that commands are refused with an authentication error.

References


Add This Finding to Your Library

In Pental this write-up is in Settings, Library. Add to my library copies it into your own, rated in your firm's CVSS version, ready to put in your own words.

Free trial  ·  No card required

Only need the reporting? Our reporting tool is free and open source, with the same library.


More Network Services Findings

Every Network Services finding