Vulnerability · Published Jan 6, 2025 · Assigned by GitHub_M
CVE-2024-46981Redis' Lua library commands may lead to remote code execution
High 7.0
In plain English
A high-severity use-after-free in redis from redis. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 8.2% (higher than 95% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.
Official description
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 & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:8 | redis | 6.2.17-1.module_el8.10.0+3946+3de613d5 | ALSA-2025:0595 |
| AlmaLinux:9 | redis | 6.2.17-1.el9_5 | ALSA-2025:0693 |
| AlmaLinux:9 | redis | 7.2.7-1.module_el9.5.0+134+2e645600 | ALSA-2025:0692 |
| AlmaLinux:8 | redis-devel | 6.2.17-1.module_el8.10.0+3946+3de613d5 | ALSA-2025:0595 |
| AlmaLinux:9 | redis-devel | 7.2.7-1.module_el9.5.0+134+2e645600 | ALSA-2025:0692 |
| AlmaLinux:9 | redis-devel | 6.2.17-1.el9_5 | ALSA-2025:0693 |
| AlmaLinux:8 | redis-doc | 6.2.17-1.module_el8.10.0+3946+3de613d5 | ALSA-2025:0595 |
| AlmaLinux:9 | redis-doc | 6.2.17-1.el9_5 | ALSA-2025:0693 |
| AlmaLinux:9 | redis-doc | 7.2.7-1.module_el9.5.0+134+2e645600 | ALSA-2025:0692 |
| Alpine:v3.20 | redict | 7.3.2-r0 | ALPINE-CVE-2024-46981 |
| Alpine:v3.21 | redict | 7.3.2-r0 | ALPINE-CVE-2024-46981 |
| Alpine:v3.22 | redict | 7.3.2-r0 | ALPINE-CVE-2024-46981 |
| Alpine:v3.23 | redict | 7.3.2-r0 | ALPINE-CVE-2024-46981 |
| Alpine:v3.24 | redict | 7.3.2-r0 | ALPINE-CVE-2024-46981 |
| Alpine:v3.20 | redis | 7.2.7-r0 | ALPINE-CVE-2024-46981 |
| Alpine:v3.21 | redis | 7.2.7-r0 | ALPINE-CVE-2024-46981 |
| Alpine:v3.22 | redis | 7.2.7-r0 | ALPINE-CVE-2024-46981 |
| Alpine:v3.23 | redis | 7.2.7-r0 | ALPINE-CVE-2024-46981 |
| Alpine:v3.24 | redis | 7.2.7-r0 | ALPINE-CVE-2024-46981 |
| Alpine:v3.20 | valkey | 7.2.8-r0 | ALPINE-CVE-2024-46981 |
| Alpine:v3.21 | valkey | 7.2.8-r0 | ALPINE-CVE-2024-46981 |
| Alpine:v3.22 | valkey | 7.2.8-r0 | ALPINE-CVE-2024-46981 |
| Alpine:v3.23 | valkey | 7.2.8-r0 | ALPINE-CVE-2024-46981 |
| Alpine:v3.24 | valkey | 7.2.8-r0 | ALPINE-CVE-2024-46981 |
| Debian:14 | redict | 7.3.2+ds-1 | DEBIAN-CVE-2024-46981 |
| Debian:12 | redis | 5:7.0.15-1~deb12u3 | DSA-5856-1 |
| Debian:12 | redis | 5:7.0.15-1~deb12u3 | DEBIAN-CVE-2024-46981 |
| Debian:13 | redis | 5:7.0.15-3 | DEBIAN-CVE-2024-46981 |
| Debian:14 | redis | 5:7.0.15-3 | DEBIAN-CVE-2024-46981 |
| Debian:13 | valkey | 8.0.2+dfsg1-1 | DEBIAN-CVE-2024-46981 |
| Debian:14 | valkey | 8.0.2+dfsg1-1 | DEBIAN-CVE-2024-46981 |
| Rocky Linux:8 | redis | 0:6.2.17-1.module+el8.10.0+1923+5b85c6a7 | RLSA-2025:0595 |
| Rocky Linux:9 | redis | 0:6.2.17-1.el9_5 | RLSA-2025:0693 |
| Ubuntu:25.10 | redict | no fix listed | UBUNTU-CVE-2024-46981 |
| Ubuntu:26.04:LTS | redict | no fix listed | UBUNTU-CVE-2024-46981 |
| Ubuntu:26.10 | redict | no fix listed | UBUNTU-CVE-2024-46981 |
| Ubuntu:24.04:LTS | redis | 5:7.0.15-1ubuntu0.24.04.1 | UBUNTU-CVE-2024-46981 |
| Ubuntu:24.04:LTS | redis | 5:7.0.15-1ubuntu0.24.04.1 | USN-7321-1 |
| Ubuntu:24.04:LTS | valkey | 7.2.8+dfsg1-0ubuntu0.24.04.2 | UBUNTU-CVE-2024-46981 |
| Ubuntu:24.04:LTS | valkey | 7.2.8+dfsg1-0ubuntu0.24.04.2 | USN-7359-1 |
Affected products (as reported)
Weakness: CWE-416 · Vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
References
- https://github.com/redis/redis/security/advisories/GHSA-39h2-x6c4-6w4c x_refsource_CONFIRM
- https://github.com/redis/redis/releases/tag/6.2.17 x_refsource_MISC
- https://github.com/redis/redis/releases/tag/7.2.7 x_refsource_MISC
- https://github.com/redis/redis/releases/tag/7.4.2 x_refsource_MISC
- https://lists.debian.org/debian-lts-announce/2025/01/msg00018.html
- https://www.vicarius.io/vsociety/posts/cve-2024-46981-detect-redis-vulnerability
- https://www.vicarius.io/vsociety/posts/cve-2024-46981-mitigate-redis-vulnerability