CVE-2026-85522: 
Valkey vulnerability analysis and mitigation

Overview

CVE-2026-85522 is a heap out-of-bounds read vulnerability in the Slot Migration component of valkey-io Valkey, a high-performance distributed key-value database. The flaw exists in the createSlotImportJob function within src/cluster_migrateslots.c, where a crafted RDB file containing a job_name shorter than the expected 40 bytes (CLUSTER_NAMELEN) triggers an out-of-bounds memory read during server startup. Affected versions include Valkey 9.0 through 9.0.4 and 9.1.0, as well as 9.5.0 through 9.5.4. The vulnerability was disclosed on September 4, 2026, with patches available in versions 9.0.5 and 9.1.1. It carries a CVSS v3.1 base score of 5.3 (Medium) and a CVSS v4.0 base score of 5.5 (Medium) (GitHub Advisory, Feedly).

Technical details

The root cause is a length-contract mismatch (CWE-125: Out-of-bounds Read; CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer) in the RDB loading path for RDB_OPCODE_SLOT_IMPORT. The function clusterRDBLoadSlotImport() reads a variable-length job_name string via rdbLoadStringObject() without validating its length, then passes it directly to createSlotImportJob(), which unconditionally executes memcpy(job->name, name, CLUSTER_NAMELEN) — always copying 40 bytes regardless of the actual source string length. If the RDB-supplied job_name is shorter than 40 bytes (e.g., 1 byte), the memcpy reads beyond the allocated heap buffer. The command path for slot migration already enforced the 40-byte invariant, but the RDB load path did not. AddressSanitizer (ASan) confirms a heap-buffer-overflow READ of size 40 on a 1-byte source allocation. A detailed technical write-up and reproduction steps were published in the original GitHub issue (GitHub Issue #4207, Fix PR #4210).

Impact

Successful exploitation causes a reliable server crash (denial of service) during startup RDB loading, preventing the Valkey instance from becoming operational. Because the crash occurs before normal service operation completes, a crafted RDB file can permanently prevent the instance from starting. There is no confirmed confidentiality or integrity impact — the CVSS assessment reflects availability impact only. Lateral movement potential is limited, but in clustered deployments, crashing a node during startup could disrupt cluster availability (GitHub Issue #4207, Feedly).

Exploitability

A proof-of-concept exploit is publicly available and was included in the original security issue report, with detailed reproduction steps using a crafted RDB file (GitHub Issue #4207). The attack requires no authentication and no user interaction, but does require the ability to supply or replace the RDB file loaded by the target Valkey server (e.g., via write access to the data directory or through replication). No in-the-wild exploitation has been observed. The EPSS score is approximately 0.496%, and the vulnerability is not listed in the CISA KEV catalog. NVD SSVC classifies exploitation as "poc" with partial technical impact (Feedly).

Exploitation steps

  1. Reconnaissance: Identify Valkey instances running versions 9.0–9.0.4, 9.1.0, or 9.5.0–9.5.4 with cluster-enabled yes that load RDB files from a directory the attacker can write to.
  2. Generate a baseline RDB: Start a Valkey instance and issue SAVE to produce a valid empty dump.rdb file.
  3. Craft a malicious RDB: Modify the RDB to inject an RDB_OPCODE_SLOT_IMPORT (opcode 0xF3) record with a job_name of length 1 (e.g., the single byte 'A'), one slot range (0–0), and a valid or zeroed CRC64 checksum. Example Python snippet:
from pathlib import Path
base = Path('empty.rdb').read_bytes()
prefix = base[:-9]  # strip EOF opcode + 8-byte CRC
record = bytes([0xF3, 0x01]) + b'A' + bytes([0x01, 0x00, 0x00]) + bytes([0xFF]) + b'\x00' * 8
Path('dump.rdb').write_bytes(prefix + record)
  1. Place the crafted RDB: Copy the malicious dump.rdb into the Valkey data directory configured as dir in valkey.conf.
  2. Trigger the crash: Start (or restart) the Valkey server with cluster-enabled yes pointing to the crafted RDB. During startup, clusterRDBLoadSlotImport() reads the 1-byte job_name and passes it to createSlotImportJob(), which performs a 40-byte memcpy from a 1-byte buffer, causing a heap out-of-bounds read and server crash/abort (GitHub Issue #4207).

Indicators of compromise

  • Logs: Valkey server log entries containing "Invalid slot import job name length in RDB" (post-patch, indicating a rejected malformed RDB); "Short read or OOM loading DB" or "Fatal error loading the DB" during startup with cluster mode enabled.
  • Process: Valkey server process (valkey-server) aborting immediately during startup before reaching "Ready to accept connections" when cluster-enabled yes is configured.
  • File System: Unexpected or recently modified dump.rdb file in the Valkey data directory; RDB file containing the byte sequence 0xF3 (RDB_OPCODE_SLOT_IMPORT) followed by a short-length string encoding (e.g., 0x01 for a 1-byte string).
  • ASan/Sanitizer Output: AddressSanitizer: heap-buffer-overflow with a READ of size 40 in createSlotImportJob at src/cluster_migrateslots.c in the stack trace (GitHub Issue #4207).

Mitigation and workarounds

Upgrade Valkey to version 9.0.5 or 9.1.1 (or later), which include the fix introduced in commit f4dc3ca09eb650c2fe14060090a41c524eca803f. The patch adds a length validation check in clusterRDBLoadSlotImport() that rejects any job_name whose length is not exactly CLUSTER_NAMELEN (40 bytes) before calling createSlotImportJob(). As a workaround, restrict write access to the Valkey data directory to prevent unauthorized RDB file replacement, and limit network access to Valkey instances to trusted clients only. Operators running Valkey in cluster mode should prioritize patching immediately (GitHub Release 9.1.1, Fix PR #4210).

Community reactions

The vulnerability was reported by security researcher gff-cw via a detailed GitHub issue with full GDB and ASan evidence, reproduction steps, and a proposed patch, demonstrating a high-quality responsible disclosure (GitHub Issue #4207). The Valkey maintainers responded promptly, merging the fix within three days of the report and backporting it to both the 9.0 and 9.1 release branches. Ubuntu and Amazon Linux 2023 subsequently issued security advisories for their packaged versions of Valkey. Coverage was noted in Linux security roundup publications and Tenable's Nessus plugin database (Ubuntu Advisory, Amazon Linux Advisory).

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Fixed

sid

valkey: 9.1.2-1

Fixed

trixie

valkey

Fixed

Ubuntu

Fixed

devel

valkey

Not Affected

noble

valkey

Affected

noble (esm-apps)

valkey

Affected

resolute

valkey: 9.0.4-0ubuntu0.2

Fixed

RHEL / CentOS

Unknown

Source: This report was generated using AI

Related Valkey vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-88382HIGH7.5
  • Redis logoRedis
  • valkey
NoNoSep 24, 2026
CVE-2026-92925HIGH7.1
  • Redis logoRedis
  • redis-devel
NoYesSep 17, 2026
CVE-2026-85522MEDIUM5.5
  • Valkey logoValkey
  • valkey-devel
NoYesSep 04, 2026
CVE-2026-82677LOW1.9
  • Redis logoRedis
  • redis
NoYesAug 31, 2026
CVE-2026-86227LOW1.3
  • Valkey logoValkey
  • valkey
NoYesSep 06, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management