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

12 affected componentsFixes available
Redis redis<7.4.2, <7.2.7, <6.2.17
debian/redict
7.3.2+ds-1
debian/redis<=5:6.0.16-1+deb11u2
5:6.0.16-1+deb11u55:7.0.15-1~deb12u35:7.0.15-3
debian/valkey
8.0.2+dfsg1-1
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

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

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

    Fixed in 7.3.2+ds-1
  2. Upgrade

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

    Fixed in 5:6.0.16-1+deb11u5Fixed in 5:7.0.15-1~deb12u3Fixed in 5:7.0.15-3
  3. Upgrade

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

    Fixed in 8.0.2+dfsg1-1
  4. Upgrade

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

    Fixed in 8.0.2-1
  5. Upgrade

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

    Fixed in 6.2.17-1
  6. Upgrade

    Upgrade Redis to a version that resolves this vulnerability.

    Fixed in 7.4.2
  7. Upgrade

    Upgrade Redis to a version that resolves this vulnerability.

    Fixed in 7.2.7
  8. Upgrade

    Upgrade Redis to a version that resolves this vulnerability.

    Fixed in 6.2.17
  9. 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
DescriptionSeverityWeakness
Data Sourced
via NVD·10:15 PM
Affected Software
Jan 18, 2025
Data Sourced
via Microsoft·08:00 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·08:00 AM
Affected Software
Updated
via Microsoft·08:00 AM
SeverityAffected Software
Updated
via Microsoft·08:00 AM
Severity
Updated
via Microsoft·08:00 AM
DescriptionSeverity
Mar 5, 2025
Data Sourced
via Launchpad·05:44 PM
Description
Mar 24, 2025
Data Sourced
via Ubuntu·02:06 PM
RemedyDescriptionSeverityAffected 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 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