Lua scripts can be manipulated to overcome ACL rules in Redis
Key facts
- Attack vector
- Local
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Partial Red Hat: 2 fixed, 8 without a fix
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and Red Hat. Impact type from CWE-94.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Redis | redis | before 7.0.0; 6.0.0 to before 6.2.7 | 7.0.0, 6.2.7 | Patch available | CNA |
- redis VendorRedis Affected before 7.0.0; 6.0.0 to before 6.2.7 Fixed in 7.0.0, 6.2.7 Patch available CNA
CPE configurations NVD · 12
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:redis:redis:*:*:*:*:*:*:*:* | before 6.2.7 | Vulnerable | Redis |
| cpe:2.3:a:redis:redis:7.0:rc1:*:*:*:*:*:* | 7.0 rc1 | Vulnerable | Redis |
| cpe:2.3:a:redis:redis:7.0:rc2:*:*:*:*:*:* | 7.0 rc2 | Vulnerable | Redis |
| cpe:2.3:a:redis:redis:7.0:rc3:*:*:*:*:*:* | 7.0 rc3 | Vulnerable | Redis |
| cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:* | 34 | Vulnerable | Fedoraproject |
| cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:* | 35 | Vulnerable | Fedoraproject |
| cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:* | 36 | Vulnerable | Fedoraproject |
| cpe:2.3:a:netapp:management_services_for_element_software:-:*:*:*:*:*:*:* | not specified by NVD | Vulnerable | NetApp |
| cpe:2.3:a:netapp:management_services_for_netapp_hci:-:*:*:*:*:*:*:* | not specified by NVD | Vulnerable | NetApp |
| cpe:2.3:a:oracle:communications_operations_monitor:4.3:*:*:*:*:*:*:* | 4.3 | Vulnerable | Oracle |
- cpe:2.3:a:redis:redis:*:*:*:*:*:*:*:* Versions before 6.2.7 Vulnerable ·Redis
- cpe:2.3:a:redis:redis:7.0:rc1:*:*:*:*:*:* Versions 7.0 rc1 Vulnerable ·Redis
- cpe:2.3:a:redis:redis:7.0:rc2:*:*:*:*:*:* Versions 7.0 rc2 Vulnerable ·Redis
- cpe:2.3:a:redis:redis:7.0:rc3:*:*:*:*:*:* Versions 7.0 rc3 Vulnerable ·Redis
- cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:* Versions 34 Vulnerable ·Fedoraproject
- cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:* Versions 35 Vulnerable ·Fedoraproject
- cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:* Versions 36 Vulnerable ·Fedoraproject
- cpe:2.3:a:netapp:management_services_for_element_software:-:*:*:*:*:*:*:* Versions not specified by NVD Vulnerable ·NetApp
- cpe:2.3:a:netapp:management_services_for_netapp_hci:-:*:*:*:*:*:*:* Versions not specified by NVD Vulnerable ·NetApp
- cpe:2.3:a:oracle:communications_operations_monitor:4.3:*:*:*:*:*:*:* Versions 4.3 Vulnerable ·Oracle
Remediation
- Fix · CNA redis (redis) Fixed in 7.0.0, 6.2.7
Red Hat 2 advisories
- RHSA-2022:8096 Released 2022-11-15 · Red Hat rating Lowredis security and bug fix update
- Red Hat Enterprise Linux AppStream (v. 9) redis-6.2.7-1.el9, redis-devel-6.2.7-1.el9, redis-doc-6.2.7-1.el9
- RHSA-2022:7541 Released 2022-11-08 · Red Hat rating Lowredis:6 security, bug fix, and enhancement update
- Red Hat Enterprise Linux AppStream (v. 8) redis-6.2.7-1.module+el8.7.0+15197+cc495aeb.aarch64::redis:6, redis-6.2.7-1.module+el8.7.0+15197+cc495aeb.ppc64le::redis:6, redis-6.2.7-1.module+el8.7.0+15197+cc495aeb.s390x::redis:6 +7
Fixed in the same release
Records fixed by the same vendor advisory or release, as the CNA lists them.
- Advisory ·
redis — FEDORA-2022-44373f6778
2 records Highest priority Priority HIGH 1 HIGH, 1 MEDIUM
Other records, highest priority first
- TI-2022-08550 A Malformed Lua script can crash RedisPriority MEDIUM 58
- Advisory ·
redis — FEDORA-2022-6ed1ce2838
2 records Highest priority Priority HIGH 1 HIGH, 1 MEDIUM
Other records, highest priority first
- TI-2022-08550 A Malformed Lua script can crash RedisPriority MEDIUM 58
Show 1 more group
- Advisory ·
redis — FEDORA-2022-a0a4c7eb31
2 records Highest priority Priority HIGH 1 HIGH, 1 MEDIUM
Other records, highest priority first
- TI-2022-08550 A Malformed Lua script can crash RedisPriority MEDIUM 58
Vendor assessments
Red Hat
Red Hat rating: Low. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat 3scale API Management Platform 2 | Affected | No fix yet |
| Red Hat Advanced Cluster Management for Kubernetes 2 | Affected | No fix yet: Fix deferred |
| Red Hat Ansible Automation Platform 1.2 | Affected | No fix yet |
| Red Hat Ansible Tower 3 | Affected | No fix yet |
| Red Hat Enterprise Linux 8 | Affected | No fix yet: Fix deferred |
| Red Hat Fuse 7 | Affected | No fix yet: Fix deferred |
| Red Hat OpenStack Platform 13 (Queens) | Affected | No fix planned: Out of support scope |
| Red Hat Software Collections | Affected | No fix yet: Fix deferred |
| Red Hat Enterprise Linux AppStream (v. 8) | Fixed | RHSA-2022:7541 |
| Red Hat Enterprise Linux AppStream (v. 9) | Fixed | RHSA-2022:8096 |
Timeline
- 2026-10-02 Threatist record created from CVE-2022-24735
References
Advisory 8
- https://github.com/redis/redis/security/advisories/GHSA-647m-2wmq-qmvq
- https://github.com/redis/redis/releases/tag/6.2.7
- https://github.com/redis/redis/releases/tag/7.0.0
- FEDORA-2022-6ed1ce2838
- FEDORA-2022-a0a4c7eb31
- FEDORA-2022-44373f6778
- https://security.netapp.com/advisory/ntap-20220715-0003/
- GLSA-202209-17
More Redis vulnerabilities
- TI-2022-00463 Missing authorization in Debian redis KEVCVSS 3.1CRITICAL 10.0
- TI-2025-31759 Redis Lua Use-After-Free may lead to remote code execution CVSS 3.1CRITICAL 10.0
- TI-2023-18618 Heap overflow in COMMAND GETKEYS and ACL evaluation in Redis CVSS 3.1HIGH 8.8
- TI-2024-20813 Lua library commands may lead to stack overflow and RCE in Redis CVSS 3.1HIGH 8.8
- TI-2022-08647 Heap overflow issue with the Lua cjson library used by Redis CVSS 3.1HIGH 8.8
- TI-2023-08708 Integer overflow in multiple Redis commands can lead to denial-of-service CVSS 3.1MEDIUM 5.5
Sources
- CVE-2022-24735 · CVE Program
- CVE-2022-24735 · NVD
- FIRST EPSS
- CVE-2022-24735 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences