CVE-2024-51737
High · 7.0CVSS
7.0
EPSS
0.4%
Published
Jan 8, 2025
CISA due date
—
Cloudanix analysis
A flaw in a Redis search add-on lets logged-in users run specially made search commands that can take over the server and access or change data.
- Exploitation
- Local Privilege
- Attacker needs
- Low Privilege
- Complexity
- High
- Impact
- Remote Code Execution
- Component
- Library
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Authenticated user triggers integer overflow via crafted LIMIT argument to FT.SEARCH/FT.AGGREGATE or KNN argument to FT.SEARCH, resulting in heap overflow and potential remote code execution.
Why it matters to the business
Compromise of Redis search instances allows attackers to execute arbitrary code, exfiltrate or alter indexed data, and disrupt search-dependent applications; high ecosystem prevalence of Redis modules increases blast radius for organizations relying on RediSearch.
How an attack unfolds
An authenticated Redis user issues FT.SEARCH or FT.AGGREGATE commands containing oversized or negative LIMIT values, or FT.SEARCH with malicious KNN arguments, exploiting insufficient bounds checks to cause integer overflow, subsequent heap corruption, and arbitrary code execution.
How to fix it
Upgrade RediSearch to version 2.6.24, 2.8.21, or 2.10.10 (or redisearch/redisearch GIT commit 4700446acf8abf8261b13ea8982c8c96af57a265); if upgrade is delayed, set MAXSEARCHRESULTS and MAXAGGREGATERESULTS to safe bounded values instead of -1 or large numbers.
How to confirm the fix worked
Verify installed RediSearch module version against fixed releases; attempt reproduction with controlled LIMIT and KNN arguments in a test environment and confirm absence of crashes or overflows; review configuration for MAXSEARCHRESULTS and MAXAGGREGATERESULTS settings.
Typical attack path
- Obtain authenticated Redis access with module privileges
- Craft FT.SEARCH or FT.AGGREGATE command using LIMIT set to -1 or extreme value
- Alternatively craft FT.SEARCH with malicious KNN argument
- Trigger integer overflow leading to heap overflow
- Achieve remote code execution on the Redis host
How to detect it
Review Redis command logs and slow-log entries for FT.SEARCH and FT.AGGREGATE invocations containing LIMIT or KNN arguments with suspiciously large or negative numeric values; correlate with process crashes or unexpected Redis restarts.
What your security team should do
- Immediately upgrade all RediSearch instances to a fixed version
- Audit and restrict Redis user permissions to limit FT.SEARCH/FT.AGGREGATE usage
- Apply configuration hardening to bound MAXSEARCHRESULTS and MAXAGGREGATERESULTS
- Monitor for unusual command patterns until patches are deployed
The record
RediSearch is a Redis module that provides querying, secondary indexing, and full-text search for Redis. An authenticated redis user executing FT.SEARCH or FT.AGGREGATE with a specially crafted LIMIT command argument, or FT.SEARCH with a specially crafted KNN command argument, can trigger an integer overflow, leading to heap overflow and potential remote code execution. This vulnerability is fixed in 2.6.24, 2.8.21, and 2.10.10. Avoid setting value of -1 or large values for configuration parameters MAXSEARCHRESULTS and MAXAGGREGATERESULTS, to avoid exploiting large LIMIT arguments.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Ubuntu:18.04:LTS | redisearch | 0 | No fix |
| Ubuntu:20.04:LTS | redisearch | 0 | No fix |
| Ubuntu:22.04:LTS | redisearch | 0 | No fix |
| Ubuntu:24.04:LTS | redisearch | 0 | No fix |
| Ubuntu:24.10 | redisearch | 0 | No fix |
| Ubuntu:25.04 | redisearch | 0 | No fix |
| Ubuntu:25.10 | redisearch | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | redisearch | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | redisearch | 0 | No fix |
Related vulnerabilities
- CVE-2026-112403 Pillow is a Python imaging library. CWE-122
- CVE-2026-112393 Pillow is a Python imaging library. CWE-122
- CVE-2026-112395 Pillow is a Python imaging library. CWE-122
- CVE-2026-103658 GNU Aspell 0.60.8.2 (first vulnerable version is not known) contains a heap-based buffer… CWE-122
- CVE-2026-107161 A heap-based buffer overflow flaw was found in Cyrus SASL. CWE-122
- CVE-2026-106574 ImageMagick is free and open-source software used for editing and manipulating digital… CWE-122
- CVE-2026-106564 ImageMagick is free and open-source software used for editing and manipulating digital… CWE-122
- CVE-2026-46570 In NTFS-3G before 2026.7.7, a heap buffer overflow exists in ntfs_index_walk_down() in… CWE-122