7.0high
Redis' Lua library commands may lead to remote code execution
- Severity
- 7.0high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 8.18% (higher than 94% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- BIT-KEYDB-2024-46981BIT-REDIS-2024-46981BIT-VALKEY-2024-46981GHSA-39h2-x6c4-6w4c
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
| Product or package | Versions | Reported by |
|---|---|---|
| redis redis | >= 7.4.0, < 7.4.2, >= 7.2.0, < 7.2.7, < 6.2.17, from 6.2.0 before 6.2.17, from 7.2.0 before 7.2.7, from 7.4.0 before 7.4.2 | CVE List, NVD |
| debian debian_linux | 11.0 | NVD |
| keydb (Bitnami) | before 6.3.4, from 7.2.0 | Bitnami Vulnerability Database |
| redis (Bitnami) | before 6.2.17, from 7.2.0 before 7.2.8, from 7.4.0 before 7.4.2 | Bitnami Vulnerability Database |
| valkey (Bitnami) | before 8.0.2 | Bitnami Vulnerability Database |
All scores
| GitHub_M | 7.0high CVSS:3.1 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| Bitnami Vulnerability Database | critical rating |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.
What each source says
CVE List
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.
NVD (es)
Redis es una base de datos en memoria de código abierto que persiste en el disco. Un usuario autenticado puede usar un script Lua especialmente manipulado para manipular el recolector de elementos no utilizados y potencialmente provocar la ejecución remota de código. El problema se solucionó en 7.4.2, 7.2.7 y 6.2.17. Un workaround adicional para mitigar el problema sin aplicar un parche al ejecutable redis-server es evitar que los usuarios ejecuten scripts Lua. Esto se puede hacer usando ACL para restringir los comandos EVAL y EVALSHA.
References
| https://github.com/redis/redis/security/advisories/GHSA-39h2-x6c4-6w4c | advisory, vendor-advisory | |
| https://github.com/redis/redis/releases/tag/6.2.17 | article, release-notes | |
| https://github.com/redis/redis/releases/tag/7.2.7 | article, release-notes | |
| https://github.com/redis/redis/releases/tag/7.4.2 | article, release-notes | |
| https://lists.debian.org/debian-lts-announce/2025/01/msg00018.html | advisory, mailing-list, third-party-advisory | |
| https://www.vicarius.io/vsociety/posts/cve-2024-46981-detect-redis-vulnerability | advisory, exploit, third-party-advisory | |
| https://www.vicarius.io/vsociety/posts/cve-2024-46981-mitigate-redis-vulnerability | advisory, exploit, third-party-advisory | |
| https://nvd.nist.gov/vuln/detail/CVE-2024-46981 | web | |
| https://codeberg.org/redict/redict/releases/tag/7.3.2 | web | |
| https://github.com/valkey-io/valkey/releases/tag/8.0.2 | web | |
| https://redict.io/posts/2025-01-08-redict-7.3.2-released | web | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-46981 changed 2025-03-19 | CVE Terms of Use |
| NVD | CVE-2024-46981 changed 2026-06-17 | Public domain |
| Bitnami Vulnerability Database | BIT-KEYDB-2024-46981 changed 2026-09-08 | Apache-2.0 |
| Bitnami Vulnerability Database | BIT-REDIS-2024-46981 changed 2026-09-08 | Apache-2.0 |
| Bitnami Vulnerability Database | BIT-VALKEY-2024-46981 changed 2026-09-08 | Apache-2.0 |