---
id: CVE-2024-31449
title: Lua library commands may lead to stack overflow and RCE in Redis
summary: >-
  Redis is an open source, in-memory database that persists on disk. An
  authenticated user may use a specially crafted Lua script to trigger a stack
  buffer overflow in the bit library, which may potentially lead to remote code
  execution. T…
severity: high
cvss: 7
cvssVector: 'CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H'
cvssSource: cna
cwe:
  - CWE-20
  - CWE-121
vendor: redis
product: redis
affected:
  - 'redis >= 2.6, < 6.2.16'
  - 'redis >= 7.0.0, < 7.2.6'
  - 'redis >= 7.3.0, < 7.4.1'
ssvc:
  exploitation: poc
  automatable: 'no'
  technicalImpact: total
  timestamp: '2024-11-19T04:55:44.585080Z'
exploitAvailable: true
published: '2024-10-07'
updated: '2026-11-03'
sourceUpdated: '2026-11-03T23:57:36.621Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2024-31449'
references:
  - url: 'https://github.com/redis/redis/security/advisories/GHSA-whxg-wx83-85p5'
    label: 'https://github.com/redis/redis/security/advisories/GHSA-whxg-wx83-85p5'
  - url: >-
      https://github.com/redis/redis/commit/1f7c148be2cbacf7d50aa461c58b871e87cc5ed9
    label: >-
      https://github.com/redis/redis/commit/1f7c148be2cbacf7d50aa461c58b871e87cc5ed9
tags:
  - cve.org
  - exploit-available
epss: 0.04458
epssPercentile: 0.91459
exploits:
  github: 1
  githubRepos:
    - 'https://github.com/daeseong1209/CVE-2024-31449'
  checkedAt: '2026-11-05T20:33:42.475Z'
ingestedAt: '2026-11-05T20:33:06.641Z'
---

## Overview

Redis is an open source, in-memory database that persists on disk. An authenticated user may use a specially crafted Lua script to trigger a stack buffer overflow in the bit library, which may potentially lead to remote code execution. The problem exists in all versions of Redis with Lua scripting. This problem has been fixed in Redis versions 6.2.16, 7.2.6, and 7.4.1. Users are advised to upgrade. There are no known workarounds for this vulnerability.

## Affected

- `redis >= 2.6, < 6.2.16`
- `redis >= 7.0.0, < 7.2.6`
- `redis >= 7.3.0, < 7.4.1`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
