Vulnerability · Published Oct 7, 2024 · Assigned by GitHub_M

CVE-2024-31228Denial-of-service due to unbounded pattern matching in Redis

Medium 5.5

In plain English

A medium-severity security flaw in redis from redis. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.0% (higher than 63% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)5.5Medium
Exploit odds (30 days)1.0%top 36.7% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

Redis is an open source, in-memory database that persists on disk. Authenticated users can trigger a denial-of-service by using specially crafted, long string match patterns on supported commands such as `KEYS`, `SCAN`, `PSUBSCRIBE`, `FUNCTION LIST`, `COMMAND LIST` and ACL definitions. Matching of extremely long patterns may result in unbounded recursion, leading to stack overflow and process crash. This problem has been fixed in Redis versions 6.2.16, 7.2.6, and 7.4.1. Users are advised to upgrade. There are no known workarounds for this vulnerability.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:8redis6.2.17-1.module_el8.10.0+3946+3de613d5ALSA-2025:0595
AlmaLinux:9redis6.2.17-1.el9_5ALSA-2025:0693
AlmaLinux:9redis7.2.6-1.module_el9.5.0+130+36ae7635ALSA-2024:10869
AlmaLinux:8redis-devel6.2.17-1.module_el8.10.0+3946+3de613d5ALSA-2025:0595
AlmaLinux:9redis-devel7.2.6-1.module_el9.5.0+130+36ae7635ALSA-2024:10869
AlmaLinux:9redis-devel6.2.17-1.el9_5ALSA-2025:0693
AlmaLinux:8redis-doc6.2.17-1.module_el8.10.0+3946+3de613d5ALSA-2025:0595
AlmaLinux:9redis-doc6.2.17-1.el9_5ALSA-2025:0693
AlmaLinux:9redis-doc7.2.6-1.module_el9.5.0+130+36ae7635ALSA-2024:10869
Alpine:v3.20redict7.3.1-r0ALPINE-CVE-2024-31228
Alpine:v3.21redict7.3.1-r0ALPINE-CVE-2024-31228
Alpine:v3.22redict7.3.1-r0ALPINE-CVE-2024-31228
Alpine:v3.23redict7.3.1-r0ALPINE-CVE-2024-31228
Alpine:v3.24redict7.3.1-r0ALPINE-CVE-2024-31228
Alpine:v3.20redis7.2.5-r1ALPINE-CVE-2024-31228
Alpine:v3.21redis7.2.5-r1ALPINE-CVE-2024-31228
Alpine:v3.22redis7.2.5-r1ALPINE-CVE-2024-31228
Alpine:v3.23redis7.2.5-r1ALPINE-CVE-2024-31228
Alpine:v3.24redis7.2.5-r1ALPINE-CVE-2024-31228
Alpine:v3.20valkey7.2.7-r0ALPINE-CVE-2024-31228
Alpine:v3.21valkey7.2.7-r0ALPINE-CVE-2024-31228
Alpine:v3.22valkey7.2.7-r0ALPINE-CVE-2024-31228
Alpine:v3.23valkey7.2.7-r0ALPINE-CVE-2024-31228
Alpine:v3.24valkey7.2.7-r0ALPINE-CVE-2024-31228
Debian:14redict7.3.1+ds-1DEBIAN-CVE-2024-31228
Debian:12redis5:7.0.15-1~deb12u2DEBIAN-CVE-2024-31228
Debian:13redis5:7.0.15-2DEBIAN-CVE-2024-31228
Debian:14redis5:7.0.15-2DEBIAN-CVE-2024-31228
Debian:13valkey8.0.1+dfsg1-1DEBIAN-CVE-2024-31228
Debian:14valkey8.0.1+dfsg1-1DEBIAN-CVE-2024-31228
Rocky Linux:8redis0:6.2.17-1.module+el8.10.0+1923+5b85c6a7RLSA-2025:0595
Rocky Linux:9redis0:6.2.17-1.el9_5RLSA-2025:0693
Ubuntu:24.04:LTSredis5:7.0.15-1ubuntu0.24.04.1UBUNTU-CVE-2024-31228
Ubuntu:24.04:LTSredis5:7.0.15-1ubuntu0.24.04.1USN-7321-1

Affected products (as reported)

VendorProductVersions
redis redis >= 2.2.5, < 6.2.16>= 7.0.0, < 7.2.6>= 7.3.0, < 7.4.1

Weakness: CWE-674 · Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

References