CVE-2022-24834 Heap overflow issue with the Lua cjson library used by Redis
Authenticated users can trigger a heap overflow in the Lua cjson library via crafted scripts, potentially leading to remote code execution.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2022-24834?
CVE-2022-24834 is a high-severity memory corruption vulnerability in Fedoraproject Fedora, published on 13 Jul 2023. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
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.
Which versions are affected by CVE-2022-24834?
3 open source packages ship an affected version, including keydb, redis and valkey. It affects 2 products.
| Package | Affected | Fixed in |
|---|---|---|
keydb Bitnami | From 2.6.0 | 6.0.20, 6.2.13, 7.0.12 |
redis Bitnami | From 2.6.0 | 6.0.20, 6.2.13, 7.0.12 |
valkey Bitnami | From 2.6.0 | 6.0.20, 6.2.13, 7.0.12 |
Linux distribution packages (4)
redis SUSE:Linux Enterprise Module for Server Applications 15 SP4 | All versions | 6.2.6-150400.3.22.1 |
redis SUSE:Linux Enterprise Module for Server Applications 15 SP5 | All versions | 6.2.6-150400.3.22.1 |
redis openSUSE:Leap 15.4 | All versions | 6.2.6-150400.3.22.1 |
redis openSUSE:Leap 15.5 | All versions | 6.2.6-150400.3.22.1 |
Products include Fedoraproject Fedora, Redis Redis.
How do I fix CVE-2022-24834?
Upgrade keydb to a fixed version for your release line: 6.0.20, 6.2.13 or 7.0.12.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2022-24834 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-24834 exists.
Public exploit code: 2 proofs of concept on GitHub.
Other vulnerabilities in Fedoraproject Fedora
Sources
Also known as ALPINE-CVE-2022-24834, AZL-27477, BELL-CVE-2022-24834, BIT-keydb-2022-24834, BIT-redis-2022-24834, BIT-valkey-2022-24834 and 8 more.