目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1359 元

100%

CVE-2025-46818 PoC — Redis 代码注入漏洞

来源
关联漏洞
标题: Redis 代码注入漏洞 (CVE-2025-46818)
Description:Redis是美国Redis公司的一套开源的使用ANSI C编写、支持网络、可基于内存亦可持久化的日志型、键值(Key-Value)存储数据库,并提供多种语言的API。 Redis 8.2.1及之前版本存在代码注入漏洞,该漏洞源于允许经过身份验证的用户使用特制Lua脚本操作不同LUA对象,可能导致在另一用户环境中运行任意代码。
Description
CVE-2025-46818 – Redis Lua Sandbox Cross-User Escape
介绍
# CVE-2025-46818 – Redis Lua Sandbox Cross-User Escape

Sandbox escape via deprecated Lua APIs and mutable metatables on Redis 8.2.1.

## Overview

Redis 8.2.1 keeps deprecated Lua builtins (`getfenv`, `setfenv`, `newproxy`) exposed to scripts and fails to lock metatables for basic types. An attacker can inject methods into shared metatables, capture privileged environments, and run commands with another user's permissions.

## Environment

- Redis server 8.2.1 (or any vulnerable release before 8.2.2)
- `redis-cli`
- Local network access to the Redis instance

## Files

- [`CVE-2025-46818.lua`](/CVE-2025-46818.lua) – verifies deprecated builtins are present, patches the string metatable, and exposes a helper.

## Usage

```bash
# Setup
redis-cli -h localhost -p 6379 --eval CVE-2025-46818.lua
# Invoke the injected helper (assuming the victim user has higher privileges):
redis-cli -h localhost -p 6379 EVAL "return ('test').escalate()" 0
```

**Expected result:**

On 8.2.1 the initial script reports the deprecated APIs as `true` and confirms the metatable modification. The follow-up call returns the output of `ACL WHOAMI` (or whichever privileged command you swap in). Redis 8.2.2 removes the APIs by default, makes basic metatables read-only, and logs attempts.

## Mitigation

Upgrade to Redis 8.2.2 or later, or disable Lua for untrusted users or run with `lua-enable-deprecated-api no`.
文件快照

登录后查看神龙缓存的 POC 文件快照

登录查看
备注
    1. 建议优先通过来源进行访问。
    2. 本地 POC 快照面向订阅用户开放;当原始来源失效或无法访问时,本地镜像作为订阅权益的一部分提供。
    3. 持续抓取、验证、维护这份 POC 档案需要不少投入,因此本地快照已纳入付费订阅。您的订阅是让这份资料能继续走下去的关键,由衷感谢。 查看订阅方案 →