What’s Vulnerable › Vulnerabilities
CVE-2024-31228: Denial-of-service due to unbounded pattern matching in Redis
- Severity: medium (CVSS 6.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 1.0% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2024-10-07 · updated 2026-06-17
- Weakness: CWE-674
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 products
- Redis: from 2.2.5 before 6.2.16; from 7.2.0 before 7.2.6; 7.4.0, 7.4.0-rc1, 7.4.0-rc2 — fixed in 6.2.16, 7.2.6
How to fix
Upgrade to a fixed version: Redis 6.2.16, 7.2.6. Check the vendor advisory for mitigations.
References
- https://github.com/redis/redis/commit/9317bf64659b33166a943ec03d5d9b954e86afb0
- https://github.com/redis/redis/security/advisories/GHSA-66gq-c942-6976
- https://lists.debian.org/debian-lts-announce/2024/11/msg00031.html
Get alerted when CVE-2024-31228 or the next vulnerability affects your stack