/

CVE-2026-27623

Severity:

HIGH RISK

(7.5)

Improper Input Validation in Valkey Request Handling

CVE-2026-27623

Modified

Vulnerability type

Category:

Improper Input Validation

CWE:

CWE-20, CWE-617

Impact:

Denial of Service via Server Abort

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Valkey contains an improper input validation flaw in its network request handling that can be triggered by an empty request followed by a malformed one, causing an internal assertion and server abort.

An attacker with network access to a Valkey instance can exploit this behavior to repeatedly crash the service, leading to a denial of service for legitimate clients.

Affected context

This vulnerability affects Valkey deployments using versions 9.0.0 through 9.0.2 where the server is reachable over the network by potentially untrusted clients.

It manifests in the network request processing path when the server receives an empty request that leaves internal networking state in an inconsistent condition, followed by a subsequent request that appears to violate internal invariants.

Environments that expose Valkey directly to the internet or to shared/untrusted networks are more susceptible, while tightly isolated deployments limit exposure to trusted users.

Exploit preconditions

  • Attack surface: Valkey TCP or other network interfaces accepting client requests.
  • Required access: Ability to establish a client connection and send crafted request sequences (no need for filesystem or OS-level access).
  • Trigger point: Sequence of an empty request followed by a specially structured request that the server misinterprets as violating its internal invariants.
  • Why exploitation is possible: The request processing logic does not fully reset or sanitize networking state after handling an empty request, allowing subsequent input to interact with stale state and hit an assertion that forcibly terminates the server process.

Why this happens

The underlying issue is improper input validation and state management in the network request handling code, aligning with CWE-20: Improper Input Validation.

After processing an empty request, Valkey fails to fully reset the internal networking state, leaving residual state that is inconsistent with expectations for the next request.

When the next request is parsed, the server evaluates it under incorrect assumptions, detects what it believes is an invariant violation, and triggers an assertion.

Using assertions as a hard stop in normal request-processing paths effectively couples input-handling mistakes with process termination, making malformed but reachable inputs capable of crashing the service.

Potential impact

  • Remote attacker can repeatedly crash the Valkey server, causing sustained denial of service.
  • Temporary loss of availability for applications and services relying on Valkey as a data store or cache.
  • Potential cascading failures or timeouts in upstream systems that depend on Valkey responses.
  • Operational overhead due to forced restarts, failovers, or manual intervention to restore service.

General mitigation guidance

Mitigation can focus on both hardening the code paths and reducing exposure of the service:

  • Ensure that request parsing and networking state machines fully reset internal state on every request boundary, especially after empty or malformed inputs.
  • Replace assertion-based checks in externally reachable paths with defensive error handling that logs and safely closes problem connections instead of terminating the process.
  • Apply strict validation on incoming protocol frames and commands, rejecting unexpected or incomplete requests early without altering shared state.
  • Isolate Valkey instances on trusted networks or behind authenticated proxies or gateways so only trusted clients can send traffic.
  • Use connection limits, rate limiting, and resource quotas at the network and orchestration layers to reduce the impact of abusive request patterns.

How teams detect issues like this

Detection efforts can target both the code-level pattern and runtime behavior:

  • Use static analysis or code review to identify assertion usage in network-facing request-processing code, especially where input validation is incomplete or state is reused across requests.
  • Review protocol parsing and connection handling code for incomplete resets of connection state after encountering empty or malformed input.
  • Monitor runtime logs and metrics for repeated server aborts, unexpected exits, or crash signatures that correlate with unusual client traffic patterns.
  • Deploy observability around Valkey (e.g., process health checks, restart counters, crash dumps) to quickly identify and investigate assertion-triggered shutdowns.
  • Incorporate fuzzing or robustness testing for the network protocol to discover similar state-dependent crash sequences before production deployment.

Sources

SourceLink
github.comgithub.com/valkey-io/valkey/security/advisories/GHSA-93p9-5vc7-8wgr
access.redhat.comaccess.redhat.com/security/cve/CVE-2026-27623
bugzilla.redhat.combugzilla.redhat.com/show_bug.cgi?id=2442021
security.access.redhat.comsecurity.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-27623.json

Frequently asked

questions

Yes. Any actor with network access to the Valkey instance and the ability to send crafted request sequences can potentially trigger the assertion and crash the server.

Typically no. The issue resides in low-level request handling, so the attacker generally only needs the ability to open a connection and send protocol-level traffic; no data-level authentication is required unless you front Valkey with an additional access-control layer.

The most robust fix pattern is to ensure complete state reset after handling each request (especially empty or invalid ones), replace assertions in externally reachable paths with graceful error handling, and strictly validate all incoming protocol messages before updating shared state.

Adopt defensive coding practices for network servers: avoid assertion-based termination on user input, perform comprehensive input validation, design state machines that are resilient to malformed or partial requests, and integrate fuzzing and automated robustness testing into the development lifecycle to catch state-dependent crashes early.

Find out what's already
exploitable in your codebase.