# CVE-2024-31449: Lua library commands may lead to stack overflow and RCE in Redis

Status: published. Published: 2024-10-07. Updated: 2026-11-03.

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.

## Remediation

- fix: The reporting source identifies this reference as a patch. Check the advisory for affected versions and supported release branches. (source: security-advisories@github.com) — https://github.com/redis/redis/commit/1f7c148be2cbacf7d50aa461c58b871e87cc5ed9

## Affected products and versions

- redis / redis: >= 2.6, < 6.2.16 (affected); >= 7.0.0, < 7.2.6 (affected); >= 7.3.0, < 7.4.1 (affected). Source: CNA: GitHub_M
- redis / redis: ≥ 2.6; < 6.2.16 (affected, custom); ≥ 7.0.0; < 7.2.6 (affected, custom); ≥ 7.3.0; < 7.4.1 (affected, custom). Source: ADP: CISA-ADP

## NVD configuration conditions

Affected CPE matches depend on the following AND/OR and negation conditions:

```json
[
  {
    "negate": false,
    "nodes": [
      {
        "cpeMatch": [
          {
            "criteria": "cpe:2.3:a:redis:redis:*:*:*:*:*:*:*:*",
            "versionEndExcluding": "6.2.16",
            "versionStartIncluding": "2.8.18",
            "vulnerable": true
          },
          {
            "criteria": "cpe:2.3:a:redis:redis:*:*:*:*:*:*:*:*",
            "versionEndExcluding": "7.2.6",
            "versionStartIncluding": "7.2.0",
            "vulnerable": true
          },
          {
            "criteria": "cpe:2.3:a:redis:redis:7.4.0:-:*:*:*:*:*:*",
            "vulnerable": true
          },
          {
            "criteria": "cpe:2.3:a:redis:redis:7.4.0:rc1:*:*:*:*:*:*",
            "vulnerable": true
          },
          {
            "criteria": "cpe:2.3:a:redis:redis:7.4.0:rc2:*:*:*:*:*:*",
            "vulnerable": true
          }
        ],
        "negate": false,
        "operator": "OR"
      }
    ],
    "operator": "OR"
  }
]
```

## Severity and prioritization

- CVSS 3.1: 7 (high); CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H; source: CNA: GitHub_M

- CVSS 3.1: 8.8 (high); CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H; source: NVD: nvd@nist.gov

- CVSS 3.1: 7 (high); CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H; source: NVD: security-advisories@github.com

- CISA KEV: No listing in collected sources

- EPSS: 4.46% as of 2026-11-03; percentile 91.44%

- SSVC: exploitation poc; automatable no; technical impact total; source ADP: CISA-ADP

- Weaknesses: CWE-20, CWE-121

## Exploit evidence

No exploit evidence in collected sources. This is not proof of no exploitation.

## References

- https://github.com/redis/redis/security/advisories/GHSA-whxg-wx83-85p5 (CNA: GitHub_M; x_refsource_CONFIRM)

- https://github.com/redis/redis/commit/1f7c148be2cbacf7d50aa461c58b871e87cc5ed9 (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/redis/redis/commit/1f7c148be2cbacf7d50aa461c58b871e87cc5ed9 (security-advisories@github.com; Patch)

- https://github.com/redis/redis/security/advisories/GHSA-whxg-wx83-85p5 (security-advisories@github.com; Vendor Advisory)

## Provenance

- CNA: GitHub_M: https://www.cve.org/CVERecord?id=CVE-2024-31449; retrieved 2026-11-03; source updated 2026-11-03

- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-31449; retrieved 2026-11-04; source updated 2026-11-03

- FIRST EPSS: https://api.first.org/data/v1/epss?cve=CVE-2024-31449; retrieved 2026-11-03; source updated Not reported

Revision: abd640c03391ad3a6e166528b7c6b3f2f9769002e4da5d8444de892da5a19f8d

Canonical: https://y2.dev/cve/CVE-2024-31449

## Agent and API access

Public CVE pages, Markdown, and JSON are free to read without an account or API key.

- Public catalog: https://y2.dev/cve/index.json. Follow nextCursor with the same search, filters, sort, and limit (1–100). A null cursor marks the end.

- WebMCP: search_cve_disclosures, get_cve_disclosure, get_cve_page_markdown, get_y2_cve_access. Available in compatible browsers.

- Cyber API: https://api.y2.dev/api/v2/cyber/cves and https://api.y2.dev/api/v2/cyber/cves/{cveId}.

- Y2 Pro or Elite: create a workspace API key with the intel:cyber scope and send Authorization: Bearer <Y2_API_KEY>. Setup: https://y2.dev/docs/api/create-key.

- x402: Pay per request without an account or API key. Omit Authorization, read the HTTP 402 PAYMENT-REQUIRED challenge, validate its current requirements, and retry with PAYMENT-SIGNATURE through an authorized payment client. These browser tools never make payments. Guide: https://y2.dev/docs/api/x402.

- OpenAPI: https://y2.dev/api/openapi.yaml. Agent access metadata: https://y2.dev/cve/agent.json.

Collected public records only. Check source status for coverage and freshness.