---
title: "NET-DB-023 Redis Dangerous Commands Not Restricted"
canonical: https://openvapt.com/checks/NET-DB-023.html
html: https://openvapt.com/checks/NET-DB-023.html
site: OpenVAPT, https://openvapt.com/
license: OpenVAPT Source-Available Licence 1.3, https://openvapt.com/legal/licence-text.html
modified: 2026-10-14
version: 0.1.0-alpha.6
---

# NET-DB-023 Redis Dangerous Commands Not Restricted

redis.conf neither renames nor disables CONFIG, FLUSHALL, FLUSHDB, DEBUG and KEYS, and no ACL user excludes the @dangerous category.

- Domain: Network
- Severity: Medium
- Control category: Data Services
- Fix effort: low
- CVSS v3.1 vector: `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L`
- CIS Controls v8: 4.1
- NIST CSF 2.0: PR.PS-01
- CWE: CWE-749
- OWASP Top 10 2021: A01:2021, A05:2021
- OWASP ASVS 4.0.3: 14.1.3
- NIST SP 800-53 Rev. 5: AC-6, CM-7
- Benchmark topic: Data store administrative command restriction (topic only, no benchmark text)

## Why It Matters

An attacker who reaches Redis with any credential can wipe data with FLUSHALL, rewrite the configuration with CONFIG SET to write files (the classic path to a cron job or SSH key), or stall the server with KEYS *. Removing or renaming these for application users limits what a stolen credential can do.

## How It Detects

Parses redis.conf for rename-command lines covering CONFIG, FLUSHALL, FLUSHDB, DEBUG and KEYS, or an ACL definition (user lines, or an aclfile) that excludes @dangerous or @admin. Fails when neither protection exists, unless every bind address is loopback and protected-mode is not off: then only local processes can reach Redis and the result is Pass with a note (Low exposure).

## How to Fix

Prefer ACLs on Redis 6 and newer:  user app on >secret ~app:* -@all +@read +@write -@dangerous . Otherwise add  rename-command FLUSHALL ""  (and the same for FLUSHDB, CONFIG, DEBUG, KEYS) and restart.

## How to Verify

```
redis-cli -a <secret> ACL LIST  or  redis-cli CONFIG GET dir  should be refused for the application user.
```

## Learn the Theory

- [P3 Network Exposure and Firewalls](https://openvapt.com/academy/p3.md)
- [P8 Data Services: Databases, File Shares, DNS and Mail](https://openvapt.com/academy/p8.md)
- [P19 Database, Mail and DNS Hardening](https://openvapt.com/academy/p19.md)

## References

- [Redis Security](https://redis.io/docs/latest/operate/oss_and_stack/management/security/)
- [Redis ACL](https://redis.io/docs/latest/operate/oss_and_stack/management/security/acl/)

## Source Code

https://github.com/OpenVAPT/openvapt/blob/574f7f3333c44b75a3c649e2d93a76d507f75adf/internal/checks/network/data_depth.go

Run it: `openvapt scan --only NET-DB-023`. Read it offline: `openvapt explain NET-DB-023`.

---

OpenVAPT is academic, non-commercial, source-available and built by AI Cybersecurity Engineers (AI systems, not people). Free for your own use on machines you own or control, 100% at your own risk; not for sale and not for providing services. This page in HTML: https://openvapt.com/checks/NET-DB-023.html. Part of OpenVAPT Check Catalogue. How to cite: https://openvapt.com/cite.html. Site summary for models: https://openvapt.com/llms.txt.
