Redis CVE-2025-49844:使用后漏洞可能导致远程代码执行
Redis CVE-2025-49844: Use-After-Free may lead to remote code execution

原始链接: https://redis.io/blog/security-advisory-cve-2025-49844/

## Redis 安全漏洞 – 关键远程代码执行风险 Redis 中发现了一个关键安全漏洞 (CVE-2025-49844),可能允许经过身份验证的攻击者通过 Lua 使用后释放问题执行远程代码。该漏洞的 CVSS 评分为 10.0。 **为了保护您的 Redis 实例:** 限制网络访问,强制实施强身份验证(启用保护模式),并限制用户权限 – 尤其是在 Lua 脚本方面。 **修复方案:** Redis Cloud 已自动更新。自管 Redis 软件、社区版 (CE)、开源版 (OSS) 和 Stack 的用户必须升级到以下版本或更高版本: * **软件:** 7.22.2-12, 7.8.6-207, 7.4.6-272, 7.2.4-138, 6.4.2-131 * **OSS/CE/Stack:** 8.2.2, 8.0.4, 7.4.6, 7.2.11, Stack 7.4.0-v7, 7.2.0-v19 目前,尚无证据表明该漏洞已被利用,但建议监控未经授权的访问、异常网络流量、意外的脚本活动和服务器崩溃。 该漏洞由 Wiz、Trend Micro 和 Zero Day Initiative 的研究人员负责任地报告。

Redis 存在一个潜在的远程代码执行漏洞 (CVE-2025-49844),源于使用后释放问题。虽然今天早些时候已经在 Hacker News 上讨论过,但该漏洞需要经过身份验证的用户才能利用,这降低了许多标准 Redis 安装的风险。 解决方法包括升级到安全版本,或者更简单地通过 Redis ACL 禁用 Lua 脚本执行——对于不使用 Lua 引擎的许多用户来说,这是一个可行的选择。然而,一些评论员指出 Lua 脚本是 Redis 的一项强大功能。 值得注意的是,Shodan 数据显示有超过 52,000 个 Redis 实例可公开访问。人们对 Upstash 等服务的使用者是否了解此漏洞表示担忧,但 Upstash 使用专有实现,并未直接受到影响。此漏洞凸显了内存安全编程语言的优势。
相关文章

原文

What happened?

As part of an ongoing effort by Redis and the Redis community to maintain Redis’ safety, security, and compliance posture, a security vulnerability in Redis has been identified and remediated in the versions indicated below.

What is the vulnerability?

[CVE-2025-49844] Lua use-after-free may lead to remote code execution. CVSS Score: 10.0 (Critical)

An authenticated user may use a specially crafted Lua script to manipulate the garbage collector, trigger a use-after-free and potentially lead to remote code execution.

How can you protect your Redis instance?

Exploitation of this vulnerability requires an attacker to first gain authenticated access to your Redis instance.

There are several steps you can take to protect your Redis from being accessed by a malicious actor. To minimize the risk of exploitation, it’s important to follow these best practices:

  • Restrict network access. Ensure that only authorized users and systems have access to the Redis database. Use firewalls and network policies to limit access to trusted sources and prevent unauthorized connectivity.
  • Enforce strong authentication. Enforce the use of credentials for all access to Redis instances. Avoid configurations that allow unauthenticated access, and ensure protected-mode is enabled (in CE and OSS) to prevent accidental exposure.
  • Limit permissions. Ensure that user identities with access to Redis are granted the minimum permissions necessary. Only allow trusted identities to run Lua scripts or any other potentially risky commands.

For more details on how to securely configure, deploy, and use Redis, visit the Redis Community Edition and Redis Software documentation sites.

How can I remediate?

We’ve already upgraded our Redis Cloud service with the fixes, so no additional action is required from you.

If you’re self-managing Redis, whether Software or Community versions, upgrade your Redis to the latest release.

The versions of Redis OSS, CE, Stack, and Software listed below include the fixes. Once the upgrades are performed, the vulnerability will be remediated in your environment.

VulnerabilityImpacted releasesFixed releases
[CVE-2025-49844] Lua Use-After-Free may lead to remote code execution CVSS Score: 10.0 (Critical)All Redis Software releases7.22.2-12 and above, 7.8.6-207 and above, 7.4.6-272 and above, 7.2.4-138 and above, 6.4.2-131 and above
All Redis OSS/CE/Stack releases with Lua scriptingOSS/CE: 8.2.2 and above, 8.0.4 and above, 7.4.6 and above, 7.2.11 and above, Stack: 7.4.0-v7 and above, 7.2.0-v19 and above

How can I tell if I was already exposed?

We have no evidence of exploitation of these vulnerabilities in Redis Cloud or reported in customer environments.

Below are general indicators of potential exploitation that you may use to search within your operating environment.

These technical and behavioral indicators or artifacts could be created if exploitation occurred. If you search for these within your Redis environment, you may be able to detect potential exploitation related to your Redis instance.

  • Access to the Redis database from unauthorized or unknown sources
  • Unknown or anomalous network ingress traffic to the Redis database
  • Unknown or unexpected use of the Redis scripting commands
  • Unknown or unexpected scripts present in your Redis database
  • Unexplained Redis server crashes, specifically crashes with a stack trace that originates from the Lua engine
  • Unknown, unexpected, or anomalous command execution by the redis-server user
  • Unknown or anomalous network egress traffic (or attempts) from the Redis database
  • Unknown or anomalous changes to the file system, in particular in directories that host Redis persistent or configuration files

Who gets the credit?

We thank the following researchers for being so kind as to identify this vulnerability and report it through our published process:

  • The problem was reported by Wiz researchers Benny Isaacs (@benny_isaacs), Nir Brakha, Sagi Tzadik (@sagitz_) working with Trend Micro, Zero Day Initiative
联系我们 contact @ memedata.com