Vulnerability · Published Apr 27, 2022 · Assigned by GitHub_M
CVE-2022-24735Lua scripts can be manipulated to overcome ACL rules in Redis
Low 3.9
In plain English
A low-severity code injection in redis from redis. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 2.3% (higher than 83% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:8 | redis | 6.2.7-1.module_el8.7.0+3288+a82c1b48 | ALSA-2022:7541 |
| AlmaLinux:9 | redis | 6.2.7-1.el9 | ALSA-2022:8096 |
| AlmaLinux:8 | redis-devel | 6.2.7-1.module_el8.7.0+3288+a82c1b48 | ALSA-2022:7541 |
| AlmaLinux:9 | redis-devel | 6.2.7-1.el9 | ALSA-2022:8096 |
| AlmaLinux:8 | redis-doc | 6.2.7-1.module_el8.7.0+3288+a82c1b48 | ALSA-2022:7541 |
| AlmaLinux:9 | redis-doc | 6.2.7-1.el9 | ALSA-2022:8096 |
| Alpine:v3.20 | redis | 6.2.7-r0 | ALPINE-CVE-2022-24735 |
| Alpine:v3.21 | redis | 6.2.7-r0 | ALPINE-CVE-2022-24735 |
| Alpine:v3.22 | redis | 6.2.7-r0 | ALPINE-CVE-2022-24735 |
| Alpine:v3.23 | redis | 6.2.7-r0 | ALPINE-CVE-2022-24735 |
| Alpine:v3.24 | redis | 6.2.7-r0 | ALPINE-CVE-2022-24735 |
| Debian:12 | redis | 5:7.0.1-4 | DEBIAN-CVE-2022-24735 |
| Debian:13 | redis | 5:7.0.1-4 | DEBIAN-CVE-2022-24735 |
| Debian:14 | redis | 5:7.0.1-4 | DEBIAN-CVE-2022-24735 |
| Rocky Linux:8 | redis | 0:6.2.7-1.module+el8.7.0+1105+8815ce78 | RLSA-2022:7541 |
| Rocky Linux:9 | redis | 0:6.2.7-1.el9 | RLSA-2022:8096 |
Affected products (as reported)
Weakness: CWE-94 · Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N
References
- https://github.com/redis/redis/security/advisories/GHSA-647m-2wmq-qmvq x_refsource_CONFIRM
- https://github.com/redis/redis/pull/10651 x_refsource_MISC
- https://github.com/redis/redis/releases/tag/6.2.7 x_refsource_MISC
- https://github.com/redis/redis/releases/tag/7.0.0 x_refsource_MISC
- FEDORA-2022-6ed1ce2838 vendor-advisory, x_refsource_FEDORA
- FEDORA-2022-a0a4c7eb31 vendor-advisory, x_refsource_FEDORA
- FEDORA-2022-44373f6778 vendor-advisory, x_refsource_FEDORA
- https://www.oracle.com/security-alerts/cpujul2022.html x_refsource_MISC
- https://security.netapp.com/advisory/ntap-20220715-0003/ x_refsource_CONFIRM
- GLSA-202209-17 vendor-advisory, x_refsource_GENTOO