CVE-2026-136155

Description

A flaw was found in Valkey. This vulnerability allows an authenticated attacker with permission to run scripting commands to execute arbitrary code or cause a Denial of Service (DoS) by crashing the server. The issue occurs because the Lua script debugger retains cached references to an interpreter state that is freed during asynchronous script flushing. Subsequent debugger commands access this freed memory, creating a use-after-free condition that can be manipulated to redirect control flow.

Statement

This vulnerability is rated as an Important severity rather than Critical because successful exploitation requires valid client authentication and authorization to invoke scripting features. In typical Red Hat deployments, Valkey services are placed within protected internal networks and frequently utilize Access Control Lists to restrict command privileges for standard users. If a privileged client triggers the script debugging mechanism following an asynchronous script cache flush, dereferencing invalid interpreter memory can lead to a daemon crash or potential arbitrary code execution within the server process.

Mitigation

Restrict network access and revoke scripting privileges from non-administrative users:

1. Restrict network connectivity using firewalld so that only trusted client systems can reach the Valkey service (default TCP port 6379):

firewall-cmd --permanent --zone=trusted --add-source=<trusted_ip_or_network>
firewall-cmd --permanent --zone=trusted --add-port=6379/tcp
firewall-cmd --reload

2. Restrict Lua scripting permissions through Valkey Access Control Lists (ACLs). Revoke access to scripting command categories for untrusted accounts using valkey-cli:

valkey-cli ACL SETUSER <username> -@scripting
Alternatively, explicitly disable the SCRIPT command for the user:
valkey-cli ACL SETUSER <username> -script

Caveats:
Revoking scripting permissions will impact applications that require server-side Lua execution. Applying firewall rules may cause brief network interruptions for active sessions. Applying ACL changes via persistent configuration files requires reloading or restarting the Valkey service, which will result in temporary service downtime.

Common Vulnerability Scoring System (CVSS) Score Details

Info alert:Important note

CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).

The following CVSS metrics and score provided are preliminary and subject to review.

CVSS v3 Score Breakdown

Red HatNVDcve.org
Base Score8.8N/A8.8
Attack VectorNetworkN/ANetwork
Attack ComplexityLowN/ALow
Privileges RequiredLowN/ALow
User InteractionNoneN/ANone
ScopeUnchangedN/AUnchanged
ConfidentialityHighN/AHigh
Integrity ImpactHighN/AHigh
Availability ImpactHighN/AHigh

Vector

Red Hat: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

cve.org: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Understanding the Weakness (CWE)

Confidentiality

Technical Impact: Read Memory

If the expired pointer is used in a read operation, an attacker might be able to control data read in by the application.

Availability

Technical Impact: DoS: Crash, Exit, or Restart

If the expired pointer references a memory location that is not accessible to the product, or points to a location that is "malformed" (such as NULL) or larger than expected by a read or write operation, then a crash may occur.

Integrity,Confidentiality,Availability

Technical Impact: Execute Unauthorized Code or Commands

If the expired pointer is used in a function call, or points to unexpected data in a write operation, then code execution may be possible.

Frequently Asked Questions

Want to get errata notifications? Sign up here.