# CVE-2021-32626: Lua scripts can overflow the heap-based Lua stack in Redis

- Severity: High 7.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 15.6%, higher than 96% of CVEs (2026-12-01)
- Published: 2021-10-04T17:30:11.000Z
- Modified: 2026-09-08T08:48:18.980Z
- Also known as: BIT-KEYDB-2021-32626, BIT-REDIS-2021-32626, BIT-VALKEY-2021-32626, GHSA-p486-xggp-782c
- Weaknesses: CWE-122, CWE-787
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- redis redis: >= 6.2.0, < 6.2.6; >= 6.0.0, < 6.0.16; >= 2.6.0, < 5.0.14; from 2.6 before 5.0.14; from 6.0.0 before 6.0.16; from 6.2.0 before 6.2.6
- fedoraproject fedora: 33; 34; 35
- netapp management_services_for_element_software: no versions given
- netapp management_services_for_netapp_hci: no versions given
- debian debian_linux: 10.0; 11.0
- oracle communications_operations_monitor: 4.3; 4.4; 5.0
- keydb (Bitnami): from 2.6.0 before 5.0.14; from 6.0.0 before 6.0.16; from 6.2.0 before 6.2.6
- redis (Bitnami): from 2.6.0 before 5.0.14; from 6.0.0 before 6.0.16; from 6.2.0 before 6.2.6
- valkey (Bitnami): from 2.6.0 before 5.0.14; from 6.0.0 before 6.0.16; from 6.2.0 before 6.2.6

## Every score

- GitHub_M: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 6.5 Medium `AV:N/AC:L/Au:S/C:P/I:P/A:P`
- Bitnami Vulnerability Database: rating High

## References

- <https://github.com/redis/redis/security/advisories/GHSA-p486-xggp-782c> (advisory, third-party-advisory, web)
- <https://github.com/redis/redis/commit/666ed7facf4524bf6d19b11b20faa2cf93fdf591> (advisory, patch, third-party-advisory, web)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/VL5KXFN3ATM7IIM7Q4O4PWTSRGZ5744Z/> (vendor-advisory, web)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HTYQ5ZF37HNGTZWVNJD3VXP7I6MEEF42/> (vendor-advisory, web)
- <https://lists.apache.org/thread.html/r75490c61c2cb7b6ae2c81238fd52ae13636c60435abcd732d41531a0%40%3Ccommits.druid.apache.org%3E> (mailing-list, web)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/WR5WKJWXD4D6S3DJCZ56V74ESLTDQRAB/> (vendor-advisory, web)
- <https://www.debian.org/security/2021/dsa-5001> (advisory, third-party-advisory, vendor-advisory, web)
- <https://www.oracle.com/security-alerts/cpuapr2022.html> (advisory, patch, third-party-advisory, web)
- <https://security.netapp.com/advisory/ntap-20211104-0003/> (advisory, third-party-advisory, web)
- <https://security.gentoo.org/glsa/202209-17> (advisory, third-party-advisory, vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-32626> (web)

## Sources

- CVE List: [CVE-2021-32626](https://www.cve.org/CVERecord?id=CVE-2021-32626), CVE Terms of Use, modified 2024-08-03
- NVD: [CVE-2021-32626](https://nvd.nist.gov/vuln/detail/CVE-2021-32626), Public domain, modified 2026-06-17
- Bitnami Vulnerability Database: [BIT-KEYDB-2021-32626](https://osv.dev/vulnerability/BIT-KEYDB-2021-32626), Apache-2.0, modified 2026-09-08
- Bitnami Vulnerability Database: [BIT-REDIS-2021-32626](https://osv.dev/vulnerability/BIT-REDIS-2021-32626), Apache-2.0, modified 2026-09-08
- Bitnami Vulnerability Database: [BIT-VALKEY-2021-32626](https://osv.dev/vulnerability/BIT-VALKEY-2021-32626), Apache-2.0, modified 2026-07-08

---

Page: https://cve.day/CVE-2021-32626 · Whole record: https://cve.day/CVE-2021-32626.json · Rebuilt by cve.day 2026-11-25T22:58:04.283Z
