Vulnerability · Published Oct 7, 2024 · Assigned by GitHub_M
CVE-2024-31449Lua library commands may lead to stack overflow and RCE in Redis
High 7.0
In plain English
A high-severity improper input validation in redis from redis. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 4.5% (higher than 91% 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 trigger a stack buffer overflow in the bit library, which may potentially lead to remote code execution. The problem exists in all versions of Redis with Lua scripting. This problem has been fixed in Redis versions 6.2.16, 7.2.6, and 7.4.1. Users are advised to upgrade. There are no known workarounds for this vulnerability.
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.6-1.module_el9.5.0+130+36ae7635 | ALSA-2024:10869 |
| AlmaLinux:8 | redis-devel | 6.2.17-1.module_el8.10.0+3946+3de613d5 | ALSA-2025:0595 |
| AlmaLinux:9 | redis-devel | 7.2.6-1.module_el9.5.0+130+36ae7635 | ALSA-2024:10869 |
| 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.6-1.module_el9.5.0+130+36ae7635 | ALSA-2024:10869 |
| Alpine:v3.20 | redict | 7.3.1-r0 | ALPINE-CVE-2024-31449 |
| Alpine:v3.21 | redict | 7.3.1-r0 | ALPINE-CVE-2024-31449 |
| Alpine:v3.22 | redict | 7.3.1-r0 | ALPINE-CVE-2024-31449 |
| Alpine:v3.23 | redict | 7.3.1-r0 | ALPINE-CVE-2024-31449 |
| Alpine:v3.24 | redict | 7.3.1-r0 | ALPINE-CVE-2024-31449 |
| Alpine:v3.20 | redis | 7.2.5-r1 | ALPINE-CVE-2024-31449 |
| Alpine:v3.21 | redis | 7.2.5-r1 | ALPINE-CVE-2024-31449 |
| Alpine:v3.22 | redis | 7.2.5-r1 | ALPINE-CVE-2024-31449 |
| Alpine:v3.23 | redis | 7.2.5-r1 | ALPINE-CVE-2024-31449 |
| Alpine:v3.24 | redis | 7.2.5-r1 | ALPINE-CVE-2024-31449 |
| Alpine:v3.20 | valkey | 7.2.7-r0 | ALPINE-CVE-2024-31449 |
| Alpine:v3.21 | valkey | 7.2.7-r0 | ALPINE-CVE-2024-31449 |
| Alpine:v3.22 | valkey | 7.2.7-r0 | ALPINE-CVE-2024-31449 |
| Alpine:v3.23 | valkey | 7.2.7-r0 | ALPINE-CVE-2024-31449 |
| Alpine:v3.24 | valkey | 7.2.7-r0 | ALPINE-CVE-2024-31449 |
| Debian:14 | redict | 7.3.1+ds-1 | DEBIAN-CVE-2024-31449 |
| Debian:12 | redis | 5:7.0.15-1~deb12u2 | DEBIAN-CVE-2024-31449 |
| Debian:13 | redis | 5:7.0.15-2 | DEBIAN-CVE-2024-31449 |
| Debian:14 | redis | 5:7.0.15-2 | DEBIAN-CVE-2024-31449 |
| Debian:13 | valkey | 8.0.1+dfsg1-1 | DEBIAN-CVE-2024-31449 |
| Debian:14 | valkey | 8.0.1+dfsg1-1 | DEBIAN-CVE-2024-31449 |
| 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:24.04:LTS | lua-bitop | no fix listed | UBUNTU-CVE-2024-31449 |
| Ubuntu:25.10 | lua-bitop | no fix listed | UBUNTU-CVE-2024-31449 |
| Ubuntu:26.04:LTS | lua-bitop | no fix listed | UBUNTU-CVE-2024-31449 |
| Ubuntu:26.10 | lua-bitop | no fix listed | UBUNTU-CVE-2024-31449 |
| Ubuntu:24.04:LTS | redis | 5:7.0.15-1ubuntu0.24.04.4 | UBUNTU-CVE-2024-31449 |
Affected products (as reported)
Weakness: CWE-20, CWE-121 · 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-whxg-wx83-85p5 x_refsource_CONFIRM
- https://github.com/redis/redis/commit/1f7c148be2cbacf7d50aa461c58b871e87cc5ed9 x_refsource_MISC