// For flags

CVE-2022-24735

Lua scripts can be manipulated to overcome ACL rules in Redis

Severity Score

7.8
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

1
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
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.

*Credits: N/A
CVSS Scores
Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
Required
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
None
Attack Vector
Network
Attack Complexity
Medium
Authentication
None
Confidentiality
Partial
Integrity
Partial
Availability
Partial
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
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
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