Skip to content
OpenAdvisories
Low · 3.9 CVE-2022-24735 EUVD-2022-29582

Lua scripts can be manipulated to overcome ACL rules in Redis

Published Apr 27, 2022 · Updated Apr 22, 2025 · Assigned by GitHub_M

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 products

VendorProductAffectedFixed
redis redis < 7.0.0, >= 6.0.0, < 6.2.7 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 redis 5:7.0.1-4 —
Debian 13 redis 5:7.0.1-4 —
Debian 12 redis 5:7.0.1-4 —
ReleasePackageFixed inAdvisory
RHEL 9 redis +2 6.2.7-1.el9 RHSA-2022:8096
RHEL 8 redis +2 6.2.7-1.module+el8.7.0+15197+cc495aeb RHSA-2022:7541

AlmaLinux

Errata ↗
ReleasePackageFixed inAdvisory
AlmaLinux 9 redis +2 6.2.7-1.el9 ALSA-2022:8096
AlmaLinux 8 redis +2 6.2.7-1.module_el8.7.0+3288+a82c1b48 ALSA-2022:7541

Rocky Linux

Errata ↗
ReleasePackageFixed inAdvisory
Rocky Linux 9 redis 6.2.7-1.el9 RLSA-2022:8096
Rocky Linux 8 redis 6.2.7-1.module+el8.7.0+1105+8815ce78 RLSA-2022:7541
ReleasePackageFixed inAdvisory
SLES 15 SP4 redis 6.2.6-150400.3.3.7 SUSE-SU-2022:1929-1
SLES 15 SP3 redis 6.0.14-150200.6.11.1 SUSE-SU-2022:1842-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed redis 6.2.7-1.1 openSUSE-SU-2024:12030-1
openSUSE Leap 15.4 redis 6.2.6-150400.3.3.7 SUSE-SU-2022:1929-1
openSUSE Leap 15.3 redis 6.0.14-150200.6.11.1 SUSE-SU-2022:1842-1
ReleasePackageFixed inAdvisory
Alpine v3.24 redis 6.2.7-r0 —
Alpine v3.23 redis 6.2.7-r0 —
Alpine v3.22 redis 6.2.7-r0 —
Alpine v3.21 redis 6.2.7-r0 —
Alpine v3.20 redis 6.2.7-r0 —
Show 6 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Alpine v3.19 redis 6.2.7-r0 —
Alpine v3.18 redis 6.2.7-r0 —
Alpine v3.17 redis 6.2.7-r0 —
Alpine v3.16 redis 6.2.7-r0 —
Alpine v3.15 redis 6.2.7-r0 —
Alpine v3.14 redis 6.2.7-r0 —

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 redis6 +2 6.2.7-1.amzn2023.0.3 ALAS2023-2023-064

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 compat-lua No fix yet —
Azure Linux 2 (CBL-Mariner) compat-lua No fix yet —
Azure Linux 2 (CBL-Mariner) redis 6.2.7-1 —

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 9 redis +2 6.2.7-1.el9 ELSA-2022-8096
Oracle Linux 8 redis +2 6.2.7-1.module+el8.7.0+20764+cc495aeb ELSA-2022-7541

Advisories 13

References