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

- Priority: **Routine**
- Reason: Not severe (CVSS 5.5, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2024-10-07 · Modified: 2025-11-03
- Aliases: ALPINE-CVE-2024-31228, UBUNTU-CVE-2024-31228, DEBIAN-CVE-2024-31228, CGA-2mvc-gpjg-4v82, CGA-34vj-r8rx-f25j, CGA-3fw6-w87q-m83w, CGA-3wqq-hrjm-rhhj, CGA-4hpq-fq79-9rqg, CGA-5h89-4h96-xgx4, CGA-5vrq-mvx3-fmq2, CGA-6jmf-x3p4-2r76, CGA-6mmr-ww79-xq94, CGA-6v4f-7c4c-qf7x, CGA-74mh-ghrq-3j8j, CGA-9gww-wgqq-5vv6, CGA-9v23-3mpv-r9g7, CGA-ccmc-622r-3m5q, CGA-ch49-6cpr-82jp, CGA-g7jh-fr52-cwr6, CGA-h5cp-pqx5-83j4, CGA-h5v7-27px-8637, CGA-hqjq-46mc-9574, CGA-hxhc-mqj9-9f5v, CGA-mj6m-m4v7-fp3v, CGA-p4wf-hm87-v9xx, CGA-qvq7-xqwf-59v7, CGA-r2g2-jrwq-pfq9, CGA-vgfj-6j9f-q682, CGA-w9gj-4fgv-2q48
- Record: https://cvemate.com/vulnerability/CVE-2024-31228 · JSON: https://cvemate.com/vulnerability/CVE-2024-31228/json

## Description

```text
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.
```

## Signals

- CVSS: 6.5 medium (v3.1, NVD) CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- EPSS: 1.011%, percentile 64.298%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 21)

- alpine redict (Alpine Linux): \< 7.3.1-r0
- alpine redis (Alpine Linux): ≥ 2.2.5, \< 7.2.4-r1 \| ≥ 2.2.5, \< 7.2.5-r1 \| ≥ 2.2.5, \< 6.2.18-r0 \| ≥ 2.2.5, \< 7.0.15-r1 \| ≥ 7.2.0, \< 7.2.4-r1 \| ≥ 7.2.0, \< 7.2.5-r1
- alpine valkey (Alpine Linux): \< 7.2.7-r0
- chainguard py3-redis (Chainguard): All versions (No fix recorded)
- chainguard py3.10-redis (Chainguard): All versions (No fix recorded)
- chainguard py3.11-redis (Chainguard): All versions (No fix recorded)
- chainguard py3.12-redis (Chainguard): All versions (No fix recorded)
- chainguard py3.13-redis (Chainguard): All versions (No fix recorded)
- chainguard redis-6.2 (Chainguard): \< 6.2.16-r0
- chainguard redis-7.2 (Chainguard): \< 7.2.6-r0
- chainguard redis-7.2-iamguarded-compat (Chainguard): \< 7.2.12-r2
- chainguard redis-7.4 (Chainguard): \< 7.4.1-r0
- chainguard redis-benchmark-7.2 (Chainguard): \< 7.2.12-r2
- chainguard redis-cli-7.2 (Chainguard): \< 7.2.12-r2
- chainguard redis-cluster-7.2-iamguarded-compat (Chainguard): \< 7.2.12-r2
- chainguard redis-sentinel-7.2-iamguarded-compat (Chainguard): \< 7.2.12-r2
- debian redict (Debian): \< 7.3.1+ds-1
- debian redis (Debian): \< 5:7.0.15-1~deb12u2 \| \< 5:7.0.15-2
- debian valkey (Debian): \< 8.0.1+dfsg1-1
- ubuntu redis (Ubuntu): \< 2:3.0.6-1ubuntu0.4+esm3 \| \< 5:4.0.9-1ubuntu0.2+esm5 \| \< 5:5.0.7-2ubuntu0.1+esm3 \| \< 5:6.0.16-1ubuntu1+esm2 \| \< 5:7.0.15-1ubuntu0.24.04.1

## References

- <https://github.com/redis/redis/security/advisories/GHSA-66gq-c942-6976>
- <https://github.com/redis/redis/commit/9317bf64659b33166a943ec03d5d9b954e86afb0>
- <https://lists.debian.org/debian-lts-announce/2024/11/msg00031.html>
- <https://security.alpinelinux.org/vuln/CVE-2024-31228>
- <https://ubuntu.com/security/CVE-2024-31228>
- <https://www.cve.org/CVERecord?id=CVE-2024-31228>
- <https://ubuntu.com/security/notices/USN-7321-1>
- <https://security-tracker.debian.org/tracker/CVE-2024-31228>
- <https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/31xxx/CVE-2024-31228.json>
- <https://nvd.nist.gov/vuln/detail/CVE-2024-31228>

---

Data as of 2026-12-05T03:32:10.263Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
