Redis Security in Short
Redis is the cache, session store and queue behind many web apps. Its worst flaws are in its Lua scripting, and they let anyone who can run commands take over the server. So the biggest risk is a Redis that the internet can reach: scanners find exposed Redis servers within minutes.
How to Keep Redis Safe
- Never expose Redis to the internet. Bind it to
127.0.0.1or a private network, and firewall port 6379. - Set a password (
requirepass, or ACL users on Redis 6 and later). - Update to a fixed release when one comes out, then restart Redis.
- If you don't use Lua scripts, you can block
EVALandEVALSHAwith ACLs.