CVE-2022-24834: Heap overflow issue with the Lua cjson library used by Redis

Published Jul 10, 2023
·
Updated

CVE-2022-24834 - A specially crafted Lua script executing in Redis can trigger a heap overflow in the cjson and cmsgpack libraries, and result in heap corruption and potentially remote code execution. The problem exists in all versions of Redis with Lua scripting support, starting from 2.6, and affects only authenticated and authorized users.

https://github.com/redis/redis/security/advisories/GHSA-p8x2-9v9q-c838

Other sources

Redis is an in-memory database that persists on disk. A specially crafted Lua script executing in Redis can trigger a heap overflow in the cjson library, and result with heap corruption and potentially remote code execution. The problem exists in all versions of Redis with Lua scripting support, starting from 2.6, and affects only authenticated and authorized users. The problem is fixed in versions 7.0.12, 6.2.13, and 6.0.20.

Ubuntu

Redis is vulnerable to a heap-based buffer overflow, caused by improper bounds checking by the cjson and cmsgpack libraries. By executing a specially crafted Lua script, a local authenticated attacker could overflow a buffer and execute arbitrary code on the system.

IBM

Affected Software

16 affected componentsFixes available
debian/redis<=5:5.0.14-1+deb10u2, <=5:5.0.14-1+deb10u5, <=5:6.0.16-1+deb11u2
5:7.0.15-1~deb12u15:7.0.15-1
ubuntu/redis<5:4.0.9-1ubuntu0.2+
5:4.0.9-1ubuntu0.2+
ubuntu/redis<5:5.0.7-2ubuntu0.1+
5:5.0.7-2ubuntu0.1+
ubuntu/redis<5:6.0.16-1ubuntu1+
5:6.0.16-1ubuntu1+
ubuntu/redis<2:2.8.4-2ubuntu0.2+
2:2.8.4-2ubuntu0.2+
ubuntu/redis<5:7.0.12-1
5:7.0.12-1
ubuntu/redis<2:3.0.6-1ubuntu0.4+
2:3.0.6-1ubuntu0.4+
IBM Planning Analytics<=2.0
Redis redis>=2.6.0<6.0.20
Redis redis>=6.2.0<6.2.13
Redis redis>=7.0.0<7.0.12
Fedoraproject Fedora=37
Fedoraproject Fedora=38
redhat/redis<7.0.12
7.0.12
redhat/redis<6.2.13
6.2.13
redhat/redis<6.0.20
6.0.20

Event History

Jul 10, 2023
Data Sourced
via Red Hat·02:50 PM
DescriptionSeverityAffected Software
Jul 13, 2023
CVE Published
via Ubuntu·12:00 AM
CVE Published
via MITRE·02:35 PM
Data Sourced
via MITRE·02:35 PM
DescriptionSeverityWeakness
Data Sourced
03:15 PM
DescriptionWeakness
Jan 12, 2024
Data Sourced
via Launchpad·12:07 AM
Description

Parent advisories

This vulnerability appears in the following advisories.

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 CVE-2022-24834?

CVE-2022-24834 is a vulnerability in Redis that allows a specially crafted Lua script to trigger a heap overflow in the cjson library, potentially leading to heap corruption and remote code execution.

2

What software versions are affected by CVE-2022-24834?

Versions of Redis with Lua scripting support from 2.6.0 to 6.0.20, 6.2.0 to 6.2.13, and 7.0.0 to 7.0.12 are affected by CVE-2022-24834.

3

What is the severity of CVE-2022-24834?

CVE-2022-24834 has a severity rating of 8.8, which is considered high.

4

How can CVE-2022-24834 be fixed?

Updating Redis to a version that includes the fix for CVE-2022-24834 is recommended to mitigate the vulnerability.

5

Where can I find more information about CVE-2022-24834?

More information about CVE-2022-24834 can be found in the following references: [Link 1](https://github.com/redis/redis/security/advisories/GHSA-p8x2-9v9q-c838), [Link 2](https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/TDNNH2ONMVNBQ6LUIAOAGDNFPKXNST5K/), [Link 3](https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/MIF5MAGYARYUMRFK7PQI7HYXMK2HZE5T/)

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