Skip to content

Fix Lua remote code execution (CVE-2025-49844, CVE-2025-46819, CVE-2025-46817)) - #918

Open
KIMDONGYEON00 wants to merge 4 commits into
Snapchat:mainfrom
KIMDONGYEON00:main
Open

KIMDONGYEON00 wants to merge 4 commits into
Snapchat:mainfrom
KIMDONGYEON00:main

Conversation

@KIMDONGYEON00

@KIMDONGYEON00 KIMDONGYEON00 commented Oct 7, 2025 •

Copy link
Copy Markdown

CVE-2025-29844

Redis versions 8.2.1 and below are vulnerable to remote code execution via a specially crafted Lua script that manipulates the garbage collector to trigger use-after-free.
Fixed in version 8.2.2. Workaround: Use ACL to restrict EVAL and EVALSHA commands.

CVE-2025-49844
Reference

CVE-2025-46819

Redis versions 8.2.1 and below allow an authenticated user to use a specially crafted LUA script to read out-of-bound data or crash the server and subsequent denial of service.
CVE-2025-46819
Reference

CVE-2025-46817

Redis versions 8.2.1 and below allow an authenticated user to use a specially crafted Lua script to cause an integer overflow and potentially lead to remote code execution
CVE-2025-46817
Reference

@KIMDONGYEON00 KIMDONGYEON00 changed the title Lua script may lead to remote code execution (CVE-2025-49844) Fix Lua remote code execution (CVE-2025-49844) Oct 7, 2025
LUA out-of-bound read (CVE-2025-46819)
@KIMDONGYEON00 KIMDONGYEON00 changed the title Fix Lua remote code execution (CVE-2025-49844) Fix Lua remote code execution (CVE-2025-49844, CVE-2025-46819) Oct 20, 2025
Fix Lua Library (CVE-2025-46817)
Fix Lua Library (CVE-2025-46817)
@KIMDONGYEON00 KIMDONGYEON00 changed the title Fix Lua remote code execution (CVE-2025-49844, CVE-2025-46819) Fix Lua remote code execution (CVE-2025-49844, CVE-2025-46819, CVE-2025-46817)) Oct 20, 2025
@thunze thunze mentioned this pull request Nov 8, 2025
1 of 13 tasks
github-merge-queue Bot pushed a commit to NixOS/nixpkgs that referenced this pull request Nov 13, 2025
The keydb package is broken [1], vulnerable [2], and upstream's
last release was in October 2023 [3].

[1] https://hydra.nixos.org/build/311470939/nixlog/2
[2] Snapchat/KeyDB#918
[3] https://github.com/Snapchat/KeyDB/releases
KlettIT pushed a commit to KlettIT/KeyDB that referenced this pull request Sep 28, 2026
Security fixes (backported from upstream PRs/issues):
- PR Snapchat#918: Fix Lua RCE (CVE-2025-49844, CVE-2025-46819, CVE-2025-46817)
  - lbaselib.c: safe unpack overflow check
  - llex.c: skip_sep returns size_t, fixes OOB in long string
  - lparser.c: fix use-after-free in luaY_parser
  - ltable.c: simplify luaH_getnum bounds check
- PR Snapchat#908: Fix listen before chmod on Unix sockets (CVE-2023-45145)
  - anet.c: chmod before listen in anetListen()
- Issue Snapchat#905: Fix Lua integer overflow (CVE-2024-31449)
  - lua_bit.c: clamp INT32_MIN in bit_tohex

CI changes:
- PR Snapchat#789: Fix backtick command substitutions in Dockerfiles
- Remove legacy .github/workflows/ci.yml
- Add docker-ci.yml: build multi-arch Docker image, push to ghcr.io/KlettIT/keydb
  with smoke-test, GHA layer cache
- Add packages-ci.yml: build deb (Ubuntu 20.04/22.04/24.04, Debian 11/12)
  and rpm (RHEL 8/9, Fedora 40), upload as artifacts
- Add Dockerfile.ci: slim CI Dockerfile using pre-built binaries
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants