CVE-2022-24735
Lua scripts can be manipulated to overcome ACL rules in Redis
Severity Score
Exploit Likelihood
Affected Versions
Public Exploits
1Exploited in Wild
-Decision
Descriptions
Redis is an in-memory database that persists on disk. By exploiting weaknesses in the Lua script execution environment, an attacker with access to Redis prior to version 7.0.0 or 6.2.7 can inject Lua code that will execute with the (potentially higher) privileges of another Redis user. The Lua script execution environment in Redis provides some measures that prevent a script from creating side effects that persist and can affect the execution of the same, or different script, at a later time. Several weaknesses of these measures have been publicly known for a long time, but they had no security impact as the Redis security model did not endorse the concept of users or privileges. With the introduction of ACLs in Redis 6.0, these weaknesses can be exploited by a less privileged users to inject Lua code that will execute at a later time, when a privileged user executes a Lua script. The problem is fixed in Redis versions 7.0.0 and 6.2.7. An additional workaround to mitigate this problem without patching the redis-server executable, if Lua scripting is not being used, is to block access to `SCRIPT LOAD` and `EVAL` commands using ACL rules.
Redis es una base de datos en memoria que persiste en el disco. Aprovechando las debilidades del entorno de ejecución de scripts Lua, un atacante con acceso a Redis versiones anteriores a 7.0.0 o 6.2.7 puede inyectar código Lua que será ejecutado con privilegios (potencialmente superiores) de otro usuario de Redis. El entorno de ejecución de scripts Lua en Redis proporciona algunas medidas que impiden que un script cree efectos secundarios que persistan y puedan afectar a la ejecución del mismo, o de un script diferente, en un momento posterior. Varios puntos débiles de estas medidas son conocidos públicamente desde hace mucho tiempo, pero no presentaban ningún impacto en la seguridad, ya que el modelo de seguridad de Redis no respaldaba el concepto de usuarios o privilegios. Con la introducción de ACLs en Redis versión 6.0, estas debilidades pueden ser explotadas por un usuario con menos privilegios para inyectar código Lua que será ejecutado en un momento posterior, cuando un usuario privilegiado ejecute un script Lua. El problema ha sido corregido en Redis versiones 7.0.0 y 6.2.7. Una medida adicional para mitigar este problema sin necesidad de parchear el ejecutable del servidor Redis, si no son usados scripts Lua, es bloquear el acceso a los comandos "SCRIPT LOAD" y "EVAL" usando reglas ACL
A flaw was found in the Redis database where Lua scripts can be manipulated to overcome ACL rules. This flaw allows an attacker with access to Redis to inject Lua code that executes the potentially higher privileges of another Redis user.
CVSS Scores
SSVC
- Decision:-
Timeline
- 2022-02-10 CVE Reserved
- 2022-04-27 CVE Published
- 2023-12-17 EPSS Updated
- 2024-08-03 CVE Updated
- 2024-08-03 First Exploit
- ---------- Exploited in Wild
- ---------- KEV Due Date
CWE
- CWE-94: Improper Control of Generation of Code ('Code Injection')
CAPEC
References (12)
URL | Tag | Source |
---|---|---|
https://github.com/redis/redis/releases/tag/6.2.7 | Release Notes | |
https://github.com/redis/redis/releases/tag/7.0.0 | Release Notes | |
https://github.com/redis/redis/security/advisories/GHSA-647m-2wmq-qmvq | Third Party Advisory | |
https://security.netapp.com/advisory/ntap-20220715-0003 | Third Party Advisory |
URL | Date | SRC |
---|---|---|
https://github.com/redis/redis/pull/10651 | 2024-08-03 |
URL | Date | SRC |
---|---|---|
https://www.oracle.com/security-alerts/cpujul2022.html | 2023-11-07 |
Affected Vendors, Products, and Versions
Vendor | Product | Version | Other | Status | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Vendor | Product | Version | Other | Status | <-- --> | Vendor | Product | Version | Other | Status |
Redis Search vendor "Redis" | Redis Search vendor "Redis" for product "Redis" | < 6.2.7 Search vendor "Redis" for product "Redis" and version " < 6.2.7" | - |
Affected
| ||||||
Redis Search vendor "Redis" | Redis Search vendor "Redis" for product "Redis" | 7.0 Search vendor "Redis" for product "Redis" and version "7.0" | rc1 |
Affected
| ||||||
Redis Search vendor "Redis" | Redis Search vendor "Redis" for product "Redis" | 7.0 Search vendor "Redis" for product "Redis" and version "7.0" | rc2 |
Affected
| ||||||
Redis Search vendor "Redis" | Redis Search vendor "Redis" for product "Redis" | 7.0 Search vendor "Redis" for product "Redis" and version "7.0" | rc3 |
Affected
| ||||||
Fedoraproject Search vendor "Fedoraproject" | Fedora Search vendor "Fedoraproject" for product "Fedora" | 34 Search vendor "Fedoraproject" for product "Fedora" and version "34" | - |
Affected
| ||||||
Fedoraproject Search vendor "Fedoraproject" | Fedora Search vendor "Fedoraproject" for product "Fedora" | 35 Search vendor "Fedoraproject" for product "Fedora" and version "35" | - |
Affected
| ||||||
Fedoraproject Search vendor "Fedoraproject" | Fedora Search vendor "Fedoraproject" for product "Fedora" | 36 Search vendor "Fedoraproject" for product "Fedora" and version "36" | - |
Affected
| ||||||
Netapp Search vendor "Netapp" | Management Services For Element Software Search vendor "Netapp" for product "Management Services For Element Software" | - | - |
Affected
| ||||||
Netapp Search vendor "Netapp" | Management Services For Netapp Hci Search vendor "Netapp" for product "Management Services For Netapp Hci" | - | - |
Affected
| ||||||
Oracle Search vendor "Oracle" | Communications Operations Monitor Search vendor "Oracle" for product "Communications Operations Monitor" | 4.3 Search vendor "Oracle" for product "Communications Operations Monitor" and version "4.3" | - |
Affected
| ||||||
Oracle Search vendor "Oracle" | Communications Operations Monitor Search vendor "Oracle" for product "Communications Operations Monitor" | 4.4 Search vendor "Oracle" for product "Communications Operations Monitor" and version "4.4" | - |
Affected
| ||||||
Oracle Search vendor "Oracle" | Communications Operations Monitor Search vendor "Oracle" for product "Communications Operations Monitor" | 5.0 Search vendor "Oracle" for product "Communications Operations Monitor" and version "5.0" | - |
Affected
|