CVE-2024-46981: Redis' Lua library commands may lead to remote code execution

Published Jan 6, 2025
·
Updated

Last updated 20 March 2025

Other sources

Redis is an open source, in-memory database that persists on disk. An authenticated user may use a specially crafted Lua script to manipulate the garbage collector and potentially lead to remote code execution. The problem is fixed in 7.4.2, 7.2.7, and 6.2.17. 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.

— MITRE

Redis' Lua library commands may lead to remote code execution

— Microsoft

This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.

— Launchpad

Affected Software

36 affected componentsFixes available
Redis redis<7.4.2, <7.2.7, <6.2.17
Redis redis>=6.2.0<6.2.17
Redis redis>=7.2.0<7.2.7
Redis redis>=7.4.0<7.4.2
Debian Debian Linux=11.0
Microsoft azl3 valkey 8.0.2-1<8.0.2-1
8.0.2-1
Microsoft cbl2 redis 6.2.16-1<6.2.17-1
6.2.17-1
Microsoft azl3 valkey 8.0.1-1<8.0.2-1
8.0.2-1
Microsoft cbl2 redis 6.2.17-1<6.2.17-1
6.2.17-1
debian/redict<7.3.2+ds-1
7.3.2+ds-1
debian/redis<5:7.0.15-1~deb12u3
5:7.0.15-1~deb12u3
debian/redis<5:7.0.15-3
5:7.0.15-3
debian/redis<5:7.0.15-3
5:7.0.15-3
debian/valkey<8.0.2+dfsg1-1
8.0.2+dfsg1-1
debian/valkey<8.0.2+dfsg1-1
8.0.2+dfsg1-1
debian/redict
7.3.6+ds-3
debian/redis
5:7.0.15-1~deb12u75:7.0.15-1~deb12u105:8.0.2-3+deb13u25:8.0.2-3+deb13u35:8.0.6-3
debian/valkey
8.1.1+dfsg1-3+deb13u28.1.1+dfsg1-3+deb13u39.1.2-1
alpine/redict<7.3.2-r0
7.3.2-r0
alpine/redict<7.3.2-r0
7.3.2-r0
alpine/redict<7.3.2-r0
7.3.2-r0
alpine/redict<7.3.2-r0
7.3.2-r0
alpine/redict<7.3.2-r0
7.3.2-r0
alpine/redis>=6.2.0<6.2.18-r0
6.2.18-r0
alpine/redis>=6.2.0<7.0.15-r2
7.0.15-r2
alpine/redis>=6.2.0<7.2.7-r0
7.2.7-r0
alpine/redis>=6.2.0<7.2.7-r0
7.2.7-r0
alpine/redis>=6.2.0<7.2.7-r0
7.2.7-r0
alpine/redis>=6.2.0<7.2.7-r0
7.2.7-r0
alpine/redis>=6.2.0<7.2.7-r0
7.2.7-r0
alpine/redis>=6.2.0<7.2.7-r0
7.2.7-r0
alpine/valkey<7.2.8-r0
7.2.8-r0
alpine/valkey<7.2.8-r0
7.2.8-r0
alpine/valkey<7.2.8-r0
7.2.8-r0
alpine/valkey<7.2.8-r0
7.2.8-r0
alpine/valkey<7.2.8-r0
7.2.8-r0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 8.0.2-1
  2. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 6.2.17-1
  3. Upgrade

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

    Fixed in 7.3.2+ds-1
  4. Upgrade

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

    Fixed in 5:7.0.15-1~deb12u3
  5. Upgrade

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

    Fixed in 5:7.0.15-3
  6. Upgrade

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

    Fixed in 8.0.2+dfsg1-1
  7. Upgrade

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

    Fixed in 7.3.6+ds-3
  8. Upgrade

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

    Fixed in 5:7.0.15-1~deb12u7Fixed in 5:7.0.15-1~deb12u10Fixed in 5:8.0.2-3+deb13u2Fixed in 5:8.0.2-3+deb13u3Fixed in 5:8.0.6-3
  9. Upgrade

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

    Fixed in 8.1.1+dfsg1-3+deb13u2Fixed in 8.1.1+dfsg1-3+deb13u3Fixed in 9.1.2-1
  10. Upgrade

    Upgrade alpine/redict to a version that resolves this vulnerability.

    Fixed in 7.3.2-r0
  11. Upgrade

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

    Fixed in 6.2.18-r0
  12. Upgrade

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

    Fixed in 7.0.15-r2
  13. Upgrade

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

    Fixed in 7.2.7-r0
  14. Upgrade

    Upgrade alpine/valkey to a version that resolves this vulnerability.

    Fixed in 7.2.8-r0
  15. Upgrade

    Upgrade Redis to a version that resolves this vulnerability.

    Fixed in 7.4.2
  16. Upgrade

    Upgrade Redis to a version that resolves this vulnerability.

    Fixed in 7.2.7
  17. Upgrade

    Upgrade Redis to a version that resolves this vulnerability.

    Fixed in 6.2.17
  18. Configuration

    Use Redis ACL to restrict EVAL and EVALSHA commands so users cannot execute Lua scripts.

    Redis ACL Restrict EVAL and EVALSHA = deny

Event History

Jan 6, 2025
CVE Published
via MITRE·09:11 PM
Data Sourced
via MITRE·09:11 PM
DescriptionSeverityWeakness
Data Sourced
via Red Hat·10:01 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·10:15 PM
DescriptionSeverityWeaknessAffected Software
Data Sourced
via OSV·10:15 PM
DescriptionSeverityAffected Software
Jan 18, 2025
Data Sourced
via Microsoft·08:00 AM
DescriptionSeverityWeaknessAffected Software
Mar 19, 2025
Exploit Published
via GitHub·06:26 AM

Parent advisories

This vulnerability appears in the following advisories.

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

What is the severity of CVE-2024-46981?

CVE-2024-46981 is classified as a high-severity vulnerability due to its potential for remote code execution.

2

How do I fix CVE-2024-46981?

To fix CVE-2024-46981, upgrade your Redis installation to version 7.4.2, 7.2.7, or 6.2.17.

3

What versions of Redis are affected by CVE-2024-46981?

CVE-2024-46981 affects all Redis versions prior to 7.4.2, 7.2.7, and 6.2.17.

4

Can an attacker exploit CVE-2024-46981 without authentication?

No, an attacker must be an authenticated user to exploit CVE-2024-46981.

5

What type of vulnerability is identified by CVE-2024-46981?

CVE-2024-46981 is a code execution vulnerability that arises from improper handling of the Lua scripting functionality in Redis.

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