Stack-based buffer overflow in Redis - CVE-2025-27151

 

Stack-based buffer overflow in Redis - CVE-2025-27151

Published: May 27, 2025


Vulnerability identifier: #VU109874
CSH Severity: Medium
CVSS v4: 7.1 [CVSS:4.0/AV:L/AC:H/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2025-27151
CWE-ID: CWE-121
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to execute arbitrary code on the target system.

The vulnerability exists due to a boundary error when parsing file names. A remote attacker can trick the victim into passing an overly long file path to the redis-check-aof cli, trigger a stack-based buffer overflow and execute arbitrary code on the target system.

Successful exploitation of this vulnerability may result in complete compromise of vulnerable system.


Affected software

Redis
SUSE Linux Enterprise Server 15 SP5
Debian Linux
SUSE Linux Enterprise Server for SAP Applications 15
SUSE Linux Enterprise Server 15
SUSE Linux Enterprise High Performance Computing LTSS 15
SUSE Linux Enterprise High Performance Computing ESPOS 15
SUSE Linux Enterprise High Performance Computing 15
SUSE Linux Enterprise Real Time 15
Fedora
Red Hat Enterprise Linux for ARM 64
Red Hat Enterprise Linux for x86_64
Red Hat Enterprise Linux for IBM z Systems
Red Hat Enterprise Linux for Power, little endian
Server Applications Module
openSUSE Leap
openEuler
Anolis OS
redis7-debugsource
redis7
redis7-debuginfo
redis (Debian package)
redis
redis-debuginfo
redis-debugsource
redis-devel
redis-doc
valkey-devel
valkey-debugsource
valkey-debuginfo
valkey
valkey-compat-redis
valkey (Red Hat package)

How to mitigate CVE-2025-27151

Install updates from vendor's website.

Redis - addressed in versions 7.2.9, 7.4.4, 8.0.2
redis7-debugsource - addressed in versions 7.0.8-150500.3.21.1, 7.0.8-150600.8.16.1
redis7 - addressed in versions 7.0.8-150500.3.21.1, 7.0.8-150600.8.16.1
redis7-debuginfo - addressed in versions 7.0.8-150500.3.21.1, 7.0.8-150600.8.16.1
redis (Debian package) - update to 5:7.0.15-1~deb12u5
redis - update to 7.2.9-2
redis-debuginfo - update to 7.2.9-2
redis-debugsource - update to 7.2.9-2
redis - update to 7.2.10-1
redis-devel - update to 7.2.10-1
redis-doc - update to 7.2.10-1
valkey-devel - update to 8.0.2-150700.3.5.1
valkey-debugsource - update to 8.0.2-150700.3.5.1
valkey-debuginfo - update to 8.0.2-150700.3.5.1
valkey - update to 8.0.2-150700.3.5.1
valkey-compat-redis - update to 8.0.2-150700.3.5.1
valkey - addressed in versions 8.0.4-1.el8, 8.0.4-1.el9, 8.0.4-1.fc41, 8.0.4-1.fc42, 8.0.6-1.el8, 8.0.6-1.el9, 8.0.6-1.fc41, 8.0.6-1.fc42
valkey (Red Hat package) - update to 8.0.4-1.el10_0

External References

Related Security Bulletins