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

High 7.0 Published Updated

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.

Weakness: CWE-680, CWE-122

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.

PackageAffectedFixed in
keydb BitnamiFrom 2.6.06.0.20, 6.2.13, 7.0.12
redis BitnamiFrom 2.6.06.0.20, 6.2.13, 7.0.12
valkey BitnamiFrom 2.6.06.0.20, 6.2.13, 7.0.12
Linux distribution packages (4)
redis SUSE:Linux Enterprise Module for Server Applications 15 SP4All versions6.2.6-150400.3.22.1
redis SUSE:Linux Enterprise Module for Server Applications 15 SP5All versions6.2.6-150400.3.22.1
redis openSUSE:Leap 15.4All versions6.2.6-150400.3.22.1
redis openSUSE:Leap 15.5All versions6.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.

All Fedoraproject Fedora vulnerabilities

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.

Is CVE-2022-24834 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free