CVE-2024-46981
NoneCVSS
—
EPSS
8.2%
Published
Jan 6, 2025
CISA due date
—
Cloudanix analysis
Someone who already has login access to a Redis database could run a special script that lets them take full control of that server.
- Exploitation
- Remote Authenticated
- Attacker needs
- Low Privilege
- Complexity
- Moderate
- Impact
- Remote Code Execution
- Component
- Network Service
- Class
- RCE
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
An authenticated user can submit a crafted Lua script via EVAL or EVALSHA that manipulates Redis garbage collection internals, resulting in remote code execution on the server process.
Why it matters to the business
Compromise of Redis servers could expose cached data, allow lateral movement, and interrupt dependent applications; moderate EPSS with stable trend and no known ransomware use reduces immediate urgency but widespread Redis deployment increases overall exposure.
How an attack unfolds
An attacker who possesses valid Redis credentials connects to the instance and issues a malicious Lua script through EVAL/EVALSHA commands; the script is crafted to interfere with garbage collection, ultimately achieving arbitrary code execution. No named threat actors or campaigns are associated with this issue.
How to fix it
Upgrade redis/redis to the fixed commit a0a6f23d997b024689ba157916837f493a593a34, corresponding to versions 7.4.2, 7.2.7, or 6.2.17. As an alternative mitigation without upgrading the binary, apply ACL rules that deny the EVAL and EVALSHA commands to untrusted users.
How to confirm the fix worked
Confirm the running Redis binary reports a version of 7.4.2 or newer (or the equivalent 7.2.7/6.2.17 releases). Verify that ACL policies correctly block EVAL/EVALSHA for non-administrative users if the workaround is applied.
Typical attack path
- Obtain valid Redis authentication credentials
- Establish a connection to the target Redis instance
- Submit a specially crafted Lua script using EVAL or EVALSHA
- Trigger garbage-collection manipulation to obtain remote code execution
How to detect it
Review Redis command logs and slow-log entries for frequent or anomalous EVAL/EVALSHA usage; correlate with subsequent unexpected process creation or memory behavior on the Redis host.
What your security team should do
- Apply the listed fixed versions or commit immediately on all Redis deployments
- Temporarily restrict EVAL and EVALSHA via ACL until patching is complete
- Audit existing Redis access controls and remove unnecessary Lua-script privileges
- Include Redis version checks in routine vulnerability scanning
The record
Redis is an open source, in-memory database that persists on disk. An authenticated user may use a specially crafted Lua script to manipulate the garbage collector and potentially lead to remote code execution. The problem is fixed in 7.4.2, 7.2.7, and 6.2.17. An additional workaround to mitigate the problem without patching the redis-server executable is to prevent users from executing Lua scripts. This can be done using ACL to restrict EVAL and EVALSHA commands.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| AlmaLinux:8 | redis | 0 | 6.2.17-1.module_el8.10.0+3946+3de613d5 |
| AlmaLinux:8 | redis-devel | 0 | 6.2.17-1.module_el8.10.0+3946+3de613d5 |
| AlmaLinux:8 | redis-doc | 0 | 6.2.17-1.module_el8.10.0+3946+3de613d5 |
| AlmaLinux:9 | redis | 0 | 7.2.7-1.module_el9.5.0+134+2e645600 |
| AlmaLinux:9 | redis | 0 | 6.2.17-1.el9_5 |
| AlmaLinux:9 | redis-devel | 0 | 7.2.7-1.module_el9.5.0+134+2e645600 |
| AlmaLinux:9 | redis-devel | 0 | 6.2.17-1.el9_5 |
| AlmaLinux:9 | redis-doc | 0 | 7.2.7-1.module_el9.5.0+134+2e645600 |
| AlmaLinux:9 | redis-doc | 0 | 6.2.17-1.el9_5 |
| Alpine:v3.15 | redis | 0 | 6.2.18-r0 |
| Alpine:v3.18 | redis | 0 | 7.0.15-r2 |
| Alpine:v3.19 | redis | 0 | 7.2.7-r0 |
| Alpine:v3.20 | valkey | 0 | 7.2.8-r0 |
| Alpine:v3.21 | valkey | 0 | 7.2.8-r0 |
| Alpine:v3.22 | valkey | 0 | 7.2.8-r0 |
| Bitnami | keydb | 0 | 6.3.4 |
| Bitnami | keydb | 7.4.0 | 7.4.2 |
| Bitnami | redis | 0 | 6.2.17 |
| Bitnami | redis | 7.4.0 | 7.4.2 |
| Bitnami | valkey | 0 | 7.2.7 |
| Bitnami | valkey | 0 | 8.0.2 |
| Bitnami | valkey | 7.4.0 | 7.4.2 |
| Chainguard | py3-redis | 0 | 0 |
| Chainguard | py3.10-redis | 0 | 0 |
| Chainguard | py3.11-redis | 0 | 0 |
| Chainguard | py3.12-redis | 0 | 0 |
| Chainguard | py3.13-redis | 0 | 0 |
| Chainguard | redis-6.2 | 0 | 6.2.17-r0 |
| Chainguard | redis-6.2-bitnami-compat | 0 | 6.2.17-r0 |
| Chainguard | redis-6.2-iamguarded-compat | 0 | 6.2.17-r0 |
| Chainguard | redis-6.2.10-benchmark | 0 | 6.2.10-r40 |
| Chainguard | redis-6.2.10-cli | 0 | 6.2.10-r40 |
| Chainguard | redis-7.2 | 0 | 7.2.7-r0 |
| Chainguard | redis-7.2-bitnami-compat | 0 | 7.2.7-r0 |
| Chainguard | redis-7.2-bitnami-compat | 0 | 7.4.2-r0 |
| Chainguard | redis-7.2-iamguarded-compat | 0 | 7.2.12-r2 |
| Chainguard | redis-7.4 | 0 | 7.4.2-r0 |
| Chainguard | redis-7.4-bitnami-compat | 0 | 7.4.2-r0 |
| Chainguard | redis-7.4-iamguarded-compat | 0 | 7.4.2-r0 |
| Chainguard | redis-benchmark-6.2 | 0 | 6.2.17-r0 |
| Chainguard | redis-benchmark-7.2 | 0 | 7.2.7-r0 |
| Chainguard | redis-benchmark-7.2 | 0 | 7.2.12-r2 |
| Chainguard | redis-benchmark-7.4 | 0 | 7.4.2-r0 |
| Chainguard | redis-check-aof-6.2 | 0 | 6.2.17-r0 |
| Chainguard | redis-check-rdb-6.2 | 0 | 6.2.17-r0 |
| Chainguard | redis-cli-6.2 | 0 | 6.2.17-r0 |
| Chainguard | redis-cli-7.2 | 0 | 7.2.7-r0 |
| Chainguard | redis-cli-7.2 | 0 | 7.4.2-r0 |
| Chainguard | redis-cli-7.4 | 0 | 7.4.2-r0 |
| Chainguard | redis-cluster-6.2-bitnami-compat | 0 | 6.2.17-r0 |
| Chainguard | redis-cluster-6.2-iamguarded-compat | 0 | 6.2.17-r0 |
| Chainguard | redis-cluster-7.2-bitnami-compat | 0 | 7.2.7-r0 |
| Chainguard | redis-cluster-7.2-bitnami-compat | 0 | 7.4.2-r0 |
| Chainguard | redis-cluster-7.2-iamguarded-compat | 0 | 7.2.12-r2 |
| Chainguard | redis-cluster-7.4-bitnami-compat | 0 | 7.4.2-r0 |
| Chainguard | redis-cluster-7.4-iamguarded-compat | 0 | 7.4.2-r0 |
| Chainguard | redis-sentinel-6.2 | 0 | 6.2.17-r0 |
| Chainguard | redis-sentinel-6.2-bitnami-compat | 0 | 6.2.17-r0 |
| Chainguard | redis-sentinel-6.2-iamguarded-compat | 0 | 6.2.17-r0 |
| Chainguard | redis-sentinel-7.2-bitnami-compat | 0 | 7.2.7-r0 |
| Chainguard | redis-sentinel-7.2-bitnami-compat | 0 | 7.4.2-r0 |
| Chainguard | redis-sentinel-7.2-iamguarded-compat | 0 | 7.2.12-r2 |
| Chainguard | redis-sentinel-7.4-bitnami-compat | 0 | 7.4.2-r0 |
| Chainguard | redis-sentinel-7.4-iamguarded-compat | 0 | 7.4.2-r0 |
| Debian:11 | redis | 0 | No fix |
| Debian:11 | redis | 0 | 5:6.0.16-1+deb11u5 |
| Debian:12 | redis | 0 | No fix |
| Debian:12 | redis | 0 | 5:7.0.15-1~deb12u3 |
| Debian:13 | redict | 0 | 7.3.2+ds-1 |
| Debian:13 | redis | 0 | No fix |
| Debian:13 | redis | 0 | 5:7.0.15-3 |
| Debian:13 | valkey | 0 | No fix |
| Debian:14 | redict | 0 | 7.3.2+ds-1 |
| Debian:14 | redis | 0 | 5:7.0.15-3 |
| Debian:14 | valkey | 0 | 8.0.2+dfsg1-1 |
| Mageia:9 | redis | 0 | 7.0.14-1.2.mga9 |
| Rocky Linux:8 | redis | 0 | 0:6.2.17-1.module+el8.10.0+1923+5b85c6a7 |
| Rocky Linux:9 | redis | 0 | 0:6.2.17-1.el9_5 |
| Rocky Linux:9 | redis | 0 | 0:7.2.7-1.module+el9.5.0+30204+5d6debe1 |
| SUSE:Enterprise Storage 7.1 | redis | 0 | 6.0.14-150200.6.32.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | redis | 0 | 6.0.14-150200.6.32.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | redis | 0 | 6.2.6-150400.3.31.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | redis | 0 | 6.2.6-150400.3.31.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS | redis | 0 | 6.2.6-150400.3.31.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS | redis7 | 0 | 7.0.8-150500.3.15.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP5-LTSS | redis | 0 | 6.2.6-150400.3.31.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP5-LTSS | redis7 | 0 | 7.0.8-150500.3.15.1 |
| SUSE:Linux Enterprise Module for Server Applications 15 SP6 | redis | 0 | 7.2.4-150600.3.6.1 |
| SUSE:Linux Enterprise Module for Server Applications 15 SP6 | redis7 | 0 | 7.0.8-150600.8.6.1 |
| SUSE:Linux Enterprise Server 15 SP3-LTSS | redis | 0 | 6.0.14-150200.6.32.1 |
| SUSE:Linux Enterprise Server 15 SP4-LTSS | redis | 0 | 6.2.6-150400.3.31.1 |
| SUSE:Linux Enterprise Server 15 SP5-LTSS | redis | 0 | 6.2.6-150400.3.31.1 |
| SUSE:Linux Enterprise Server 15 SP5-LTSS | redis7 | 0 | 7.0.8-150500.3.15.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP3 | redis | 0 | 6.0.14-150200.6.32.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP4 | redis | 0 | 6.2.6-150400.3.31.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP5 | redis | 0 | 6.2.6-150400.3.31.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP5 | redis7 | 0 | 7.0.8-150500.3.15.1 |
| SUSE:Manager Proxy 4.3 | redis | 0 | 6.2.6-150400.3.31.1 |
| SUSE:Manager Server 4.3 | redis | 0 | 6.2.6-150400.3.31.1 |
| Ubuntu:20.04:LTS | redis | 0 | No fix |
| Ubuntu:22.04:LTS | redis | 0 | No fix |
| Ubuntu:24.04:LTS | redis | 0 | No fix |
| Ubuntu:24.04:LTS | redis | 0 | 5:7.0.15-1ubuntu0.24.04.1 |
| Ubuntu:24.04:LTS | valkey | 0 | No fix |
| Ubuntu:24.04:LTS | valkey | 0 | 7.2.8+dfsg1-0ubuntu0.24.04.2 |
| Ubuntu:24.10 | redict | 0 | No fix |
| Ubuntu:24.10 | redis | 0 | No fix |
| Ubuntu:24.10 | valkey | 0 | No fix |
| Ubuntu:25.04 | redict | 0 | No fix |
| Ubuntu:25.04 | redis | 0 | No fix |
| Ubuntu:25.04 | valkey | 0 | No fix |
| Ubuntu:25.10 | redict | 0 | No fix |
| Ubuntu:25.10 | redis | 0 | No fix |
| Ubuntu:25.10 | valkey | 0 | No fix |
| Ubuntu:Pro:14.04:LTS | redis | 0 | No fix |
| Ubuntu:Pro:14.04:LTS | redis | 0 | 2:2.8.4-2ubuntu0.2+esm4 |
| Ubuntu:Pro:16.04:LTS | redis | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | redis | 0 | 2:3.0.6-1ubuntu0.4+esm3 |
| Ubuntu:Pro:18.04:LTS | redis | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | redis | 0 | 5:4.0.9-1ubuntu0.2+esm5 |
| Ubuntu:Pro:20.04:LTS | redis | 0 | 5:5.0.7-2ubuntu0.1+esm3 |
| Ubuntu:Pro:22.04:LTS | redis | 0 | 5:6.0.16-1ubuntu1+esm2 |
| Wolfi | redis-6.2 | 0 | 6.2.17-r0 |
| Wolfi | redis-6.2-bitnami-compat | 0 | 6.2.17-r0 |
| Wolfi | redis-7.2 | 0 | 7.2.7-r0 |
| Wolfi | redis-7.2-bitnami-compat | 0 | 7.4.2-r0 |
| Wolfi | redis-7.4 | 0 | 7.4.2-r0 |
| Wolfi | redis-benchmark-6.2 | 0 | 6.2.17-r0 |
| Wolfi | redis-benchmark-7.2 | 0 | 7.2.12-r2 |
| Wolfi | redis-check-aof-6.2 | 0 | 6.2.17-r0 |
| Wolfi | redis-check-rdb-6.2 | 0 | 6.2.17-r0 |
| Wolfi | redis-cli-6.2 | 0 | 6.2.17-r0 |
| Wolfi | redis-cli-7.2 | 0 | 7.4.2-r0 |
| Wolfi | redis-cluster-6.2-bitnami-compat | 0 | 6.2.17-r0 |
| Wolfi | redis-cluster-7.2-bitnami-compat | 0 | 7.4.2-r0 |
| Wolfi | redis-sentinel-6.2 | 0 | 6.2.17-r0 |
| Wolfi | redis-sentinel-6.2-bitnami-compat | 0 | 6.2.17-r0 |
| Wolfi | redis-sentinel-7.2-bitnami-compat | 0 | 7.4.2-r0 |
| openSUSE:Leap 15.6 | redis | 0 | 7.2.4-150600.3.6.1 |
| openSUSE:Leap 15.6 | redis7 | 0 | 7.0.8-150600.8.6.1 |
| openSUSE:Tumbleweed | redis | 0 | 8.0.2-1.1 |
| openSUSE:Tumbleweed | valkey | 0 | 8.0.2-1.1 |
Related vulnerabilities
- CVE-2025-49844 Redis is an open source, in-memory database that persists on disk. Also affects redis
- CVE-2024-31228 Redis is an open source, in-memory database that persists on disk. Also affects redis
- CVE-2024-31449 Redis is an open source, in-memory database that persists on disk. Also affects redis
- CVE-2024-51741 Redis is an open source, in-memory database that persists on disk. Also affects redis
- CVE-2024-31227 Redis is an open source, in-memory database that persists on disk. Also affects redis
- CVE-2025-62507 Redis: Bug in XACKDEL may lead to stack overflow and potential RCE Also affects keydb
- CVE-2022-0543 It was discovered, that redis, a persistent key-value database, due to a packaging issue… Also affects redis-6.2
- CVE-2016-8339 A buffer overflow in Redis 3.2.x prior to 3.2.4 causes arbitrary code execution when a… Also affects redis