Vulnerability · Published May 29, 2025 · Assigned by GitHub_M
CVE-2025-27151redis-check-aof may lead to stack overflow and potential RCE
Medium 4.7
In plain English
A medium-severity improper input validation 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.1% (higher than 65% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
Redis is an open source, in-memory database that persists on disk. In versions starting from 7.0.0 to before 8.0.2, a stack-based buffer overflow exists in redis-check-aof due to the use of memcpy with strlen(filepath) when copying a user-supplied file path into a fixed-size stack buffer. This allows an attacker to overflow the stack and potentially achieve code execution. This issue has been patched in version 8.0.2.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:9 | redis | 7.2.10-1.module_el9.6.0+173+efaf9205 | ALSA-2025:12008 |
| AlmaLinux:9 | redis-devel | 7.2.10-1.module_el9.6.0+173+efaf9205 | ALSA-2025:12008 |
| AlmaLinux:9 | redis-doc | 7.2.10-1.module_el9.6.0+173+efaf9205 | ALSA-2025:12008 |
| AlmaLinux:10 | valkey | 8.0.4-1.el10_0 | ALSA-2025:11401 |
| AlmaLinux:10 | valkey-devel | 8.0.4-1.el10_0 | ALSA-2025:11401 |
| Alpine:v3.20 | redict | 7.3.3-r1 | ALPINE-CVE-2025-27151 |
| Alpine:v3.21 | redict | 7.3.3-r1 | ALPINE-CVE-2025-27151 |
| Alpine:v3.22 | redict | 7.3.3-r1 | ALPINE-CVE-2025-27151 |
| Alpine:v3.23 | redict | 7.3.3-r1 | ALPINE-CVE-2025-27151 |
| Alpine:v3.24 | redict | 7.3.3-r1 | ALPINE-CVE-2025-27151 |
| Alpine:v3.20 | redis | 7.2.9-r0 | ALPINE-CVE-2025-27151 |
| Alpine:v3.21 | redis | 7.2.9-r0 | ALPINE-CVE-2025-27151 |
| Alpine:v3.22 | redis | 8.0.2-r0 | ALPINE-CVE-2025-27151 |
| Alpine:v3.23 | redis | 8.0.2-r0 | ALPINE-CVE-2025-27151 |
| Alpine:v3.24 | redis | 8.0.2-r0 | ALPINE-CVE-2025-27151 |
| Alpine:v3.20 | valkey | 7.2.9-r1 | ALPINE-CVE-2025-27151 |
| Alpine:v3.21 | valkey | 7.2.9-r1 | ALPINE-CVE-2025-27151 |
| Alpine:v3.22 | valkey | 8.1.1-r1 | ALPINE-CVE-2025-27151 |
| Alpine:v3.23 | valkey | 8.1.1-r1 | ALPINE-CVE-2025-27151 |
| Alpine:v3.24 | valkey | 8.1.1-r1 | ALPINE-CVE-2025-27151 |
| Debian:14 | redict | 7.3.5+ds-1 | DEBIAN-CVE-2025-27151 |
| Debian:12 | redis | 5:7.0.15-1~deb12u5 | DSA-5969-1 |
| Debian:12 | redis | 5:7.0.15-1~deb12u5 | DEBIAN-CVE-2025-27151 |
| Debian:13 | redis | 5:8.0.2-2 | DEBIAN-CVE-2025-27151 |
| Debian:14 | redis | 5:8.0.2-2 | DEBIAN-CVE-2025-27151 |
| Debian:13 | valkey | 8.1.1+dfsg1-1.1 | DEBIAN-CVE-2025-27151 |
| Debian:14 | valkey | 8.1.1+dfsg1-1.1 | DEBIAN-CVE-2025-27151 |
| Rocky Linux:9 | redis | 0:7.2.10-1.module+el9.6.0+32323+e27e860a | RLSA-2025:12008 |
| Rocky Linux:10 | valkey | 0:8.0.4-1.el10_0 | RLSA-2025:11401 |
| Ubuntu:24.04:LTS | redis | no fix listed | UBUNTU-CVE-2025-27151 |
Affected products (as reported)
Weakness: CWE-20, CWE-121 · Vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
References
- https://github.com/redis/redis/security/advisories/GHSA-5453-q98w-cmvm x_refsource_CONFIRM
- https://github.com/redis/redis/commit/643b5db235cb82508e72f11c7b4bbfc7dc39be56 x_refsource_MISC
- https://github.com/redis/redis/releases/tag/8.0.2 x_refsource_MISC