Lua scripts can overflow the heap-based Lua stack in Redis
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Partial Red Hat: 9 fixed, 2 without a fix
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and Red Hat. Impact type from CWE-122 and the CVSS impact.
Summary
Redis is an open source, in-memory database that persists on disk. In affected versions specially crafted Lua scripts executing in Redis can cause the heap-based Lua stack to be overflowed, due to incomplete checks for this condition. This can result with heap corruption and potentially remote code execution. This problem exists in all versions of Redis with Lua scripting support, starting from 2.6. The problem is fixed in versions 6.2.6, 6.0.16 and 5.0.14. For users unable to update an additional workaround to mitigate the problem without patching the redis-server executable is to prevent users from executing Lua scripts. This can be done using ACL to restrict EVAL and EVALSHA commands.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Redis | redis | 6.2.0 to before 6.2.6; 6.0.0 to before 6.0.16; 2.6.0 to before 5.0.14 | 6.2.6, 6.0.16, 5.0.14 | Patch available | CNA |
- redis VendorRedis Affected 6.2.0 to before 6.2.6; 6.0.0 to before 6.0.16; 2.6.0 to before 5.0.14 Fixed in 6.2.6, 6.0.16, 5.0.14 Patch available CNA
CPE configurations NVD · 11
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:redis:redis:*:*:*:*:*:*:*:* | 2.6 to before 5.0.14; 6.0.0 to before 6.0.16; 6.2.0 to before 6.2.6 | Vulnerable | Redis |
| cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:* | 33 | Vulnerable | Fedoraproject |
| cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:* | 34 | Vulnerable | Fedoraproject |
| cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:* | 35 | 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:o:debian:debian_linux:10.0:*:*:*:*:*:*:* | 10.0 | Vulnerable | Debian |
| cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:* | 11.0 | Vulnerable | Debian |
| cpe:2.3:a:oracle:communications_operations_monitor:4.3:*:*:*:*:*:*:* | 4.3 | Vulnerable | Oracle |
| cpe:2.3:a:oracle:communications_operations_monitor:4.4:*:*:*:*:*:*:* | 4.4 | Vulnerable | Oracle |
- cpe:2.3:a:redis:redis:*:*:*:*:*:*:*:* Versions 2.6 to before 5.0.14; 6.0.0 to before 6.0.16; 6.2.0 to before 6.2.6 Vulnerable ·Redis
- cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:* Versions 33 Vulnerable ·Fedoraproject
- 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: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:o:debian:debian_linux:10.0:*:*:*:*:*:*:* Versions 10.0 Vulnerable ·Debian
- cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:* Versions 11.0 Vulnerable ·Debian
- cpe:2.3:a:oracle:communications_operations_monitor:4.3:*:*:*:*:*:*:* Versions 4.3 Vulnerable ·Oracle
- cpe:2.3:a:oracle:communications_operations_monitor:4.4:*:*:*:*:*:*:* Versions 4.4 Vulnerable ·Oracle
Remediation
- Fix · CNA redis (redis) Fixed in 6.2.6, 6.0.16, 5.0.14
Red Hat 10 advisories
- RHSA-2021:4618 Released 2021-11-11 · Red Hat rating ImportantRed Hat Advanced Cluster Management 2.4 images and security updates
- Red Hat Advanced Cluster Management for Kubernetes 2.4 for RHEL 8 rhacm2/acm-grafana-rhel8, rhacm2/acm-must-gather-rhel8, rhacm2/acm-operator-bundle +47
- RHSA-2021:3980 Released 2021-10-25 · Red Hat rating ImportantRed Hat OpenStack Platform 13.0 (redis) security update
- Red Hat OpenStack Platform 13.0 - ELS redis-3.2.8-5.el7ost
- Red Hat OpenStack Platform 13.0 for RHEL 7.6 EUS Server redis-3.2.8-5.el7ost
- RHSA-2021:3971 Released 2021-10-25 · Red Hat rating ImportantRed Hat OpenStack Platform 10.0 (redis) security update
- Red Hat OpenStack Platform 10.0 redis-3.2.8-5.el7ost
Show 7 more Red Hat advisories
- RHSA-2021:3949 Released 2021-10-20 · Red Hat rating ImportantRed Hat Advanced Cluster Management 2.1.12 security fixes and container updates
- Red Hat Advanced Cluster Management for Kubernetes 2.1 for RHEL 8 rhacm2/acm-must-gather-rhel8
- RHSA-2021:3945 Released 2021-10-20 · Red Hat rating Importantredis:6 security update
- Red Hat Enterprise Linux AppStream (v. 8) redis-6.0.9-5.module+el8.4.0+12929+1bb0d2aa.aarch64::redis:6, redis-6.0.9-5.module+el8.4.0+12929+1bb0d2aa.ppc64le::redis:6, redis-6.0.9-5.module+el8.4.0+12929+1bb0d2aa.s390x::redis:6 +7
- RHSA-2021:3946 Released 2021-10-20 · Red Hat rating Importantredis:5 security update
- Red Hat Enterprise Linux AppStream EUS (v. 8.1) redis-5.0.3-5.module+el8.1.0+12925+6460abef.aarch64::redis:5, redis-5.0.3-5.module+el8.1.0+12925+6460abef.ppc64le::redis:5, redis-5.0.3-5.module+el8.1.0+12925+6460abef.s390x::redis:5 +7
- RHSA-2021:3944 Released 2021-10-20 · Red Hat rating Importantredis:5 security update
- Red Hat Enterprise Linux AppStream EUS (v. 8.2) redis-5.0.3-5.module+el8.2.0+12926+485b5fc9.aarch64::redis:5, redis-5.0.3-5.module+el8.2.0+12926+485b5fc9.ppc64le::redis:5, redis-5.0.3-5.module+el8.2.0+12926+485b5fc9.s390x::redis:5 +7
- RHSA-2021:3947 Released 2021-10-20 · Red Hat rating Importantrh-redis5-redis security update
- Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) rh-redis5-redis-5.0.5-3.el7
- Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.7) rh-redis5-redis-5.0.5-3.el7
- Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) rh-redis5-redis-5.0.5-3.el7
- RHSA-2021:3918 Released 2021-10-19 · Red Hat rating Importantredis:5 security update
- Red Hat Enterprise Linux AppStream (v. 8) redis-5.0.3-5.module+el8.4.0+12927+b9845322.aarch64::redis:5, redis-5.0.3-5.module+el8.4.0+12927+b9845322.ppc64le::redis:5, redis-5.0.3-5.module+el8.4.0+12927+b9845322.s390x::redis:5 +7
- RHSA-2021:3873 Released 2021-10-14 · Red Hat rating ImportantRed Hat Advanced Cluster Management 2.2.9 security, bug, and container updates
- Red Hat Advanced Cluster Management for Kubernetes 2.2 for RHEL 7 rhacm2/management-ingress-rhel7, rhacm2/memcached-exporter-rhel7, rhacm2/search-aggregator-rhel7 +1
- Red Hat Advanced Cluster Management for Kubernetes 2.2 for RHEL 8 rhacm2/acm-must-gather-rhel8, rhacm2/acm-operator-bundle, rhacm2/acmesolver-rhel8 +47
Fixed in the same release
Records fixed by the same vendor advisory or release, as the CNA lists them.
- Advisory ·
redis — FEDORA-2021-61c487f241
8 records Highest priority Priority MEDIUM 6 MEDIUM, 2 LOW
Other records, highest priority first
- TI-2021-12343 DoS vulnerability in RedisPriority MEDIUM 49
- TI-2021-12297 Vulnerability in handling large ziplistsPriority MEDIUM 48
- TI-2021-12429 Integer overflow that can lead to heap overflow in redis-cli, redis-sentinel on some platformsPriority MEDIUM 43
- Advisory ·
redis — FEDORA-2021-8913c7900c
8 records Highest priority Priority MEDIUM 6 MEDIUM, 2 LOW
Other records, highest priority first
- TI-2021-12343 DoS vulnerability in RedisPriority MEDIUM 49
- TI-2021-12297 Vulnerability in handling large ziplistsPriority MEDIUM 48
- TI-2021-12429 Integer overflow that can lead to heap overflow in redis-cli, redis-sentinel on some platformsPriority MEDIUM 43
Show 1 more group
- Advisory ·
redis — FEDORA-2021-aa94492a09
8 records Highest priority Priority MEDIUM 6 MEDIUM, 2 LOW
Other records, highest priority first
- TI-2021-12343 DoS vulnerability in RedisPriority MEDIUM 49
- TI-2021-12297 Vulnerability in handling large ziplistsPriority MEDIUM 48
- TI-2021-12429 Integer overflow that can lead to heap overflow in redis-cli, redis-sentinel on some platformsPriority MEDIUM 43
Vendor assessments
Red Hat
Red Hat rating: Important. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Advanced Cluster Management for Kubernetes 2 | Affected | No fix yet |
| Red Hat Ansible Tower 3 | Affected | No fix yet |
| Red Hat Enterprise Linux AppStream (v. 8) | Fixed | RHSA-2021:3918, RHSA-2021:3945 |
| Red Hat Enterprise Linux AppStream EUS (v. 8.1) | Fixed | RHSA-2021:3946 |
| Red Hat Enterprise Linux AppStream EUS (v. 8.2) | Fixed | RHSA-2021:3944 |
| Red Hat OpenStack Platform 10.0 | Fixed | RHSA-2021:3971 |
| Red Hat OpenStack Platform 13.0 - ELS | Fixed | RHSA-2021:3980 |
| Red Hat OpenStack Platform 13.0 for RHEL 7.6 EUS Server | Fixed | RHSA-2021:3980 |
| Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) | Fixed | RHSA-2021:3947 |
| Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.7) | Fixed | RHSA-2021:3947 |
| Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) | Fixed | RHSA-2021:3947 |
Not affected: 4 products
- Red Hat 3scale API Management Platform 2
- Red Hat Ansible Automation Platform 1.2
- Red Hat Enterprise Linux 9
- Red Hat Software Collections
Timeline
- 2026-10-02 Threatist record created from CVE-2021-32626
References
Patch 2
Advisory 7
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-2022-08549 Lua scripts can be manipulated to overcome ACL rules in Redis CVSS 3.1HIGH 7.8
Sources
- CVE-2021-32626 · CVE Program
- CVE-2021-32626 · NVD
- FIRST EPSS
- CVE-2021-32626 · 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