Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-85522

CVE-2026-85522: Valkey Slot Migration RCE Vulnerability

CVE-2026-85522 is a remote code execution vulnerability in valkey-io valkey affecting versions up to 9.5.4 and 9.1.0. The flaw exists in the slot migration component and can be exploited remotely. This article covers technical details, affected versions, impact assessment, and mitigation strategies.

Published:

CVE-2026-85522 Overview

CVE-2026-85522 is an out-of-bounds read vulnerability in Valkey, the open-source in-memory data store. The flaw affects the createSlotImportJob function in src/cluster_migrateslots.c, part of the Slot Migration component. Attackers can trigger the condition remotely by manipulating the job_name argument. Affected versions include Valkey up to 9.5.4/9.1.0, and the issue is resolved in versions 9.0.5 and 9.1.1. The fix is tracked in commit f4dc3ca09eb650c2fe14060090a41c524eca803f. A public exploit is available, increasing the likelihood of opportunistic use against unpatched clusters.

Critical Impact

Remote attackers can trigger an out-of-bounds read in Valkey's Slot Migration logic, potentially leaking memory contents or crashing the affected node without authentication.

Affected Products

  • Valkey versions up to 9.5.4
  • Valkey 9.1.0
  • src/cluster_migrateslots.c (Slot Migration component)

Discovery Timeline

  • 2026-09-04 - CVE-2026-85522 published to NVD
  • 2026-09-08 - Last updated in NVD database

Technical Details for CVE-2026-85522

Vulnerability Analysis

The vulnerability resides in createSlotImportJob within src/cluster_migrateslots.c, which handles cluster slot migration jobs. When Valkey loads a slot import record from an RDB (Redis Database) file, it reads the job_name string but does not validate its length. Downstream code assumes the name is exactly CLUSTER_NAMELEN bytes, so a shorter or malformed value causes reads beyond the allocated buffer. This defect is categorized as [CWE-119] (Improper Restriction of Operations within the Bounds of a Memory Buffer). The primary impact is on availability, with potential secondary exposure of adjacent memory contents through error paths or logs.

Root Cause

The root cause is missing input validation on the deserialized job_name object. The RDB loader accepted arbitrary-length strings and passed them into logic that indexes by fixed-length cluster name semantics, producing an out-of-bounds read.

Attack Vector

The attack executes over the network against a Valkey instance that processes an attacker-influenced RDB payload during slot migration or replication. No authentication or user interaction is required. Successful exploitation causes a memory read past the allocated buffer, which may crash the server process or expose adjacent heap data.

c
/* Load a single slot import from the RDB. */
int clusterRDBLoadSlotImport(rio *rdb) {
-    robj *job_name;
+    robj *job_name = NULL;
    list *slot_ranges = createSlotRangeList();
    uint64_t num_slot_ranges;
    if ((job_name = rdbLoadStringObject(rdb)) == NULL) goto err;
+    if (sdslen(objectGetVal(job_name)) != CLUSTER_NAMELEN) {
+        serverLog(LL_WARNING, "Invalid slot import job name length in RDB");
+        goto err;
+    }
    if ((num_slot_ranges = rdbLoadLen(rdb, NULL)) == RDB_LENERR) goto err;
    for (uint64_t i = 0; i < num_slot_ranges; i++) {
        uint64_t start_slot;

Source: GitHub Commit f4dc3ca. The patch initializes job_name to NULL and rejects any imported name whose length does not equal CLUSTER_NAMELEN, logging a warning and jumping to the error path.

Detection Methods for CVE-2026-85522

Indicators of Compromise

  • Unexpected Valkey process crashes or restart loops on cluster nodes handling slot migration.
  • Log entries referencing malformed RDB loads or slot import failures near the cluster_migrateslots code path.
  • Unauthenticated inbound connections to Valkey ports (default 6379) followed by cluster bus traffic on port 16379.

Detection Strategies

  • Inventory Valkey deployments and flag any instance running versions at or below 9.5.4 or 9.1.0.
  • Monitor cluster bus traffic for anomalous slot import messages that do not originate from known cluster members.
  • Enable core dump collection on Valkey hosts so out-of-bounds reads that trigger SIGSEGV can be triaged.

Monitoring Recommendations

  • Alert on repeated crashes of the valkey-server process within short time windows.
  • Track connection sources to cluster bus ports and restrict them to expected peer IP ranges.
  • Correlate Valkey warning logs with network telemetry to identify remote nodes issuing malformed RDB payloads.

How to Mitigate CVE-2026-85522

Immediate Actions Required

  • Upgrade Valkey to version 9.0.5 or 9.1.1, which contain the fix in commit f4dc3ca09eb650c2fe14060090a41c524eca803f.
  • Restrict network access to Valkey client and cluster bus ports so only trusted hosts can connect.
  • Audit cluster membership and remove any unrecognized nodes participating in slot migration.

Patch Information

The upstream fix is included in the GitHub Release 9.1.1 and backported to the 9.0.5 branch. See the GitHub Pull Request #4210 and GitHub Issue #4207 Discussion for review context, and VulDB CVE-2026-85522 for the tracking record.

Workarounds

  • Disable or avoid using the Slot Migration feature until patched builds are deployed.
  • Enforce firewall rules that limit Valkey cluster bus traffic (default port 16379) to trusted peer addresses only.
  • Require TLS and authentication on all Valkey listeners to reduce exposure of the RDB load path to untrusted clients.
bash
# Verify installed Valkey version and upgrade if vulnerable
valkey-server --version

# Example: restrict cluster bus port to trusted peers with iptables
iptables -A INPUT -p tcp --dport 16379 -s 10.0.0.0/24 -j ACCEPT
iptables -A INPUT -p tcp --dport 16379 -j DROP

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.