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

Published Oct 4, 2021
·
Updated

A heap buffer overflow was found in redis. Specially crafted Lua scripts executing in Redis cause the heap-based Lua stack to overflow due to incomplete checks for this condition. This flaw allows a remote attacker to corrupt the heap and potentially trigger remote code execution. The highest threat from this vulnerability is to confidentiality, integrity, as well as system availability.

Other sources

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.

Affected Software

19 affected componentsFixes available
redhat/redis<0:3.2.8-5.el7
0:3.2.8-5.el7
redhat/rh-redis5-redis<0:5.0.5-3.el7
0:5.0.5-3.el7
debian/redis
5:5.0.14-1+deb10u25:5.0.14-1+deb10u55:6.0.16-1+deb11u25:7.0.11-15:7.0.14-1
redhat/redis<6.2.6
6.2.6
redhat/redis<6.0.16
6.0.16
redhat/redis<5.0.14
5.0.14
Redis redis>=2.6<5.0.14
Redis redis>=6.0.0<6.0.16
Redis redis>=6.2.0<6.2.6
Fedoraproject Fedora=33
Fedoraproject Fedora=34
Fedoraproject Fedora=35
NetApp Management Services For Element Software
NetApp Management Services For Netapp Hci
Debian Debian Linux=10.0
Debian Debian Linux=11.0
Oracle Communications Operations Monitor=4.3
Oracle Communications Operations Monitor=4.4
Oracle Communications Operations Monitor=5.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade redhat/redis to a version that resolves this vulnerability.

    Fixed in 0:3.2.8-5.el7
  2. Upgrade

    Upgrade redhat/rh-redis5-redis to a version that resolves this vulnerability.

    Fixed in 0:5.0.5-3.el7
  3. Upgrade

    Upgrade debian/redis to a version that resolves this vulnerability.

    Fixed in 5:5.0.14-1+deb10u2Fixed in 5:5.0.14-1+deb10u5Fixed in 5:6.0.16-1+deb11u2Fixed in 5:7.0.11-1Fixed in 5:7.0.14-1
  4. Upgrade

    Upgrade redhat/redis to a version that resolves this vulnerability.

    Fixed in 6.2.6
  5. Upgrade

    Upgrade redhat/redis to a version that resolves this vulnerability.

    Fixed in 6.0.16
  6. Upgrade

    Upgrade redhat/redis to a version that resolves this vulnerability.

    Fixed in 5.0.14
  7. Upgrade

    Upgrade Redis to a version that resolves this vulnerability.

    Fixed in 6.2.6
  8. Upgrade

    Upgrade Redis to a version that resolves this vulnerability.

    Fixed in 6.0.16
  9. Upgrade

    Upgrade Redis to a version that resolves this vulnerability.

    Fixed in 5.0.14
  10. Configuration

    Use Redis ACL to prevent users from executing Lua scripts by restricting (denying) the EVAL and EVALSHA commands.

    Redis ACL deny commands = EVAL and EVALSHA

Event History

Oct 4, 2021
CVE Published
12:00 AM
CVE Published
via MITRE·05:30 PM
Data Sourced
via MITRE·05:30 PM
DescriptionSeverityWeakness
Oct 5, 2021
Data Sourced
via Red Hat·06:47 PM
DescriptionSeverityAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the vulnerability ID for this vulnerability?

The vulnerability ID for this vulnerability is CVE-2021-32626.

2

What is the severity of CVE-2021-32626?

The severity of CVE-2021-32626 is high with a severity value of 8.8.

3

Which software versions are affected by CVE-2021-32626?

CVE-2021-32626 affects Redis versions 2.6 to 6.2.6.

4

How can this vulnerability be fixed?

To fix CVE-2021-32626, upgrade to Redis version 6.2.6.

5

Are there any references or additional information for CVE-2021-32626?

Yes, there are references and additional information available for CVE-2021-32626. They can be found at the following links: [Link 1](https://github.com/redis/redis/commit/666ed7facf4524bf6d19b11b20faa2cf93fdf591), [Link 2](https://github.com/redis/redis/security/advisories/GHSA-p486-xggp-782c), [Link 3](https://bugzilla.redhat.com/show_bug.cgi/show_bug.cgi?id=2012217).

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203