CVE-2025-27151: CWE-20: Improper Input Validation in redis redis
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.
AI Analysis
Technical Summary
CVE-2025-27151 is a medium-severity vulnerability affecting Redis versions 7.0.0 up to but not including 8.0.2. Redis is a widely used open-source, in-memory database that also persists data on disk. The vulnerability arises in the redis-check-aof utility, which is used to verify and repair the Append Only File (AOF) that Redis uses for data persistence. Specifically, the issue is a stack-based buffer overflow caused by improper input validation (CWE-20) and unsafe memory copying practices (CWE-121). The utility uses memcpy with strlen(filepath) to copy a user-supplied file path into a fixed-size stack buffer without proper bounds checking. This can lead to a buffer overflow on the stack, potentially allowing an attacker to execute arbitrary code with the privileges of the user running redis-check-aof. Exploitation requires local access with at least low privileges and a high attack complexity, as indicated by the CVSS vector (AV:L/AC:H/PR:L/UI:N). No user interaction is needed, and the vulnerability impacts availability (denial of service or code execution) but not confidentiality or integrity directly. The flaw has been patched in Redis version 8.0.2. There are no known exploits in the wild at this time. Given the nature of the vulnerability, exploitation would likely require an attacker to have some level of access to the host system or the ability to supply malicious file paths to redis-check-aof, which is typically used by administrators or automated maintenance scripts. This vulnerability highlights the risks of unsafe memory operations in critical system utilities and the importance of input validation to prevent buffer overflows.
Potential Impact
For European organizations, the impact of this vulnerability could be significant, particularly for those relying on Redis for critical caching, session management, or as a primary data store. Successful exploitation could lead to denial of service or remote code execution on systems running vulnerable Redis versions, potentially disrupting business operations or enabling further lateral movement within networks. Since redis-check-aof is generally run locally, the risk is higher in environments where untrusted users have access to the host or where automated processes might be tricked into processing malicious file paths. Organizations in sectors such as finance, telecommunications, and public services that use Redis extensively could face operational downtime or compromise of internal systems. The vulnerability does not directly affect confidentiality or integrity of data stored in Redis but could be leveraged as a stepping stone for broader attacks. The medium CVSS score reflects the limited attack vector (local) and high complexity, but the potential for code execution elevates the risk beyond simple denial of service. Given Redis's popularity in European enterprises and cloud providers, unpatched systems represent a tangible risk.
Mitigation Recommendations
European organizations should prioritize upgrading Redis installations to version 8.0.2 or later, where this vulnerability is patched. Where immediate upgrade is not feasible, restrict access to redis-check-aof utility to trusted administrators only and ensure it is not exposed to untrusted users or automated processes that could be manipulated. Implement strict file system permissions to prevent unauthorized users from supplying or modifying file paths used by redis-check-aof. Employ host-based intrusion detection systems to monitor for unusual executions of redis-check-aof or suspicious process behaviors. Additionally, conduct regular audits of Redis versions deployed across the environment and integrate vulnerability scanning to detect outdated versions. For environments using containerized Redis instances, ensure base images are updated and rebuilt promptly. Finally, apply the principle of least privilege to Redis service accounts and related utilities to limit the impact of potential exploitation.
Affected Countries
Germany, France, United Kingdom, Netherlands, Italy, Spain, Sweden, Poland
CVE-2025-27151: CWE-20: Improper Input Validation in redis redis
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.
AI-Powered Analysis
Technical Analysis
CVE-2025-27151 is a medium-severity vulnerability affecting Redis versions 7.0.0 up to but not including 8.0.2. Redis is a widely used open-source, in-memory database that also persists data on disk. The vulnerability arises in the redis-check-aof utility, which is used to verify and repair the Append Only File (AOF) that Redis uses for data persistence. Specifically, the issue is a stack-based buffer overflow caused by improper input validation (CWE-20) and unsafe memory copying practices (CWE-121). The utility uses memcpy with strlen(filepath) to copy a user-supplied file path into a fixed-size stack buffer without proper bounds checking. This can lead to a buffer overflow on the stack, potentially allowing an attacker to execute arbitrary code with the privileges of the user running redis-check-aof. Exploitation requires local access with at least low privileges and a high attack complexity, as indicated by the CVSS vector (AV:L/AC:H/PR:L/UI:N). No user interaction is needed, and the vulnerability impacts availability (denial of service or code execution) but not confidentiality or integrity directly. The flaw has been patched in Redis version 8.0.2. There are no known exploits in the wild at this time. Given the nature of the vulnerability, exploitation would likely require an attacker to have some level of access to the host system or the ability to supply malicious file paths to redis-check-aof, which is typically used by administrators or automated maintenance scripts. This vulnerability highlights the risks of unsafe memory operations in critical system utilities and the importance of input validation to prevent buffer overflows.
Potential Impact
For European organizations, the impact of this vulnerability could be significant, particularly for those relying on Redis for critical caching, session management, or as a primary data store. Successful exploitation could lead to denial of service or remote code execution on systems running vulnerable Redis versions, potentially disrupting business operations or enabling further lateral movement within networks. Since redis-check-aof is generally run locally, the risk is higher in environments where untrusted users have access to the host or where automated processes might be tricked into processing malicious file paths. Organizations in sectors such as finance, telecommunications, and public services that use Redis extensively could face operational downtime or compromise of internal systems. The vulnerability does not directly affect confidentiality or integrity of data stored in Redis but could be leveraged as a stepping stone for broader attacks. The medium CVSS score reflects the limited attack vector (local) and high complexity, but the potential for code execution elevates the risk beyond simple denial of service. Given Redis's popularity in European enterprises and cloud providers, unpatched systems represent a tangible risk.
Mitigation Recommendations
European organizations should prioritize upgrading Redis installations to version 8.0.2 or later, where this vulnerability is patched. Where immediate upgrade is not feasible, restrict access to redis-check-aof utility to trusted administrators only and ensure it is not exposed to untrusted users or automated processes that could be manipulated. Implement strict file system permissions to prevent unauthorized users from supplying or modifying file paths used by redis-check-aof. Employ host-based intrusion detection systems to monitor for unusual executions of redis-check-aof or suspicious process behaviors. Additionally, conduct regular audits of Redis versions deployed across the environment and integrate vulnerability scanning to detect outdated versions. For environments using containerized Redis instances, ensure base images are updated and rebuilt promptly. Finally, apply the principle of least privilege to Redis service accounts and related utilities to limit the impact of potential exploitation.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2025-02-19T16:30:47.779Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 6838254f182aa0cae2753d82
Added to database: 5/29/2025, 9:13:51 AM
Last enriched: 7/7/2025, 4:55:04 AM
Last updated: 8/18/2025, 8:17:22 AM
Views: 34
Related Threats
CVE-2025-53948: CWE-415 Double Free in Santesoft Sante PACS Server
HighCVE-2025-52584: CWE-122 Heap-based Buffer Overflow in Ashlar-Vellum Cobalt
HighCVE-2025-46269: CWE-122 Heap-based Buffer Overflow in Ashlar-Vellum Cobalt
HighCVE-2025-54862: CWE-79 Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') in Santesoft Sante PACS Server
MediumCVE-2025-54759: CWE-79 Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') in Santesoft Sante PACS Server
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.