CVE-2024-46981
JSON

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 packageVersionsReported 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.2CVE List, NVD
debian debian_linux11.0NVD
keydb (Bitnami)before 6.3.4, from 7.2.0Bitnami Vulnerability Database
redis (Bitnami)before 6.2.17, from 7.2.0 before 7.2.8, from 7.4.0 before 7.4.2Bitnami Vulnerability Database
valkey (Bitnami)before 8.0.2Bitnami Vulnerability Database

All scores

GitHub_M7.0high CVSS:3.1CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Bitnami Vulnerability Databasecritical rating

Classification

CWE-416

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-6w4cadvisory, vendor-advisory
https://github.com/redis/redis/releases/tag/6.2.17article, release-notes
https://github.com/redis/redis/releases/tag/7.2.7article, release-notes
https://github.com/redis/redis/releases/tag/7.4.2article, release-notes
https://lists.debian.org/debian-lts-announce/2025/01/msg00018.htmladvisory, mailing-list, third-party-advisory
https://www.vicarius.io/vsociety/posts/cve-2024-46981-detect-redis-vulnerabilityadvisory, exploit, third-party-advisory
https://www.vicarius.io/vsociety/posts/cve-2024-46981-mitigate-redis-vulnerabilityadvisory, exploit, third-party-advisory
https://nvd.nist.gov/vuln/detail/CVE-2024-46981web
https://codeberg.org/redict/redict/releases/tag/7.3.2web
https://github.com/valkey-io/valkey/releases/tag/8.0.2web
https://redict.io/posts/2025-01-08-redict-7.3.2-releasedweb

Sources

SourceRecordLicence
CVE ListCVE-2024-46981 changed 2025-03-19CVE Terms of Use
NVDCVE-2024-46981 changed 2026-06-17Public domain
Bitnami Vulnerability DatabaseBIT-KEYDB-2024-46981 changed 2026-09-08Apache-2.0
Bitnami Vulnerability DatabaseBIT-REDIS-2024-46981 changed 2026-09-08Apache-2.0
Bitnami Vulnerability DatabaseBIT-VALKEY-2024-46981 changed 2026-09-08Apache-2.0