⚠️

سلب مسئولیت و اخلاق حرفه‌ای

این مطالب صرفاً برای اهداف آموزشی، پژوهشی و افزایش آگاهی امنیتی ارائه شده‌اند. هرگونه استفاده غیرمجاز، غیرقانونی یا سوءاستفاده از اطلاعات، ابزارها و روش‌های مطرح‌شده، کاملاً بر عهده مخاطب است. نویسنده و منتشرکننده هیچ مسئولیتی در قبال خسارات، آسیب‌ها یا پیامدهای ناشی از استفاده نادرست از این مطالب نخواهند داشت.

CVE-2026-59348: RediSearch Query Injection in RedisChatMemoryRepository Broadens Search Scope | Alireza Bolbolabadi - Red Team Security
LOADING

CVE-2026-59348: RediSearch Query Injection in RedisChatMemoryRepository Broadens Search Scope

Executive Summary

CVE-2026-59348 describes a RediSearch query injection vulnerability in RedisChatMemoryRepository, a component used to back conversational memory in Redis. The repository composes RediSearch queries from caller-supplied conversation content and metadata. A previous remediation added escaping to one of these construction paths, but similar paths that build queries the same way remained unescaped. When an attacker controls a value that reaches one of the unescaped paths, RediSearch syntax embedded in that value can reshape the resulting query rather than being treated as literal search text. The practical effect is a search that escapes its intended scope, allowing retrieval of, or interference with, chat messages belonging to conversations other than the caller's own.

The vulnerability is rated medium with a CVSS score of 4.8. No full CVSS vector, affected version range, or patched release identifier is provided in the public advisory, and no in-the-wild exploitation or public proof-of-concept has been reported.

Affected systems

  • RedisChatMemoryRepository, the conversational memory layer that wraps RediSearch queries around user-supplied content and metadata.

  • Any application architecture that routes end-user-supplied content or metadata into the repository's search methods without applying its own sanitization or escaping first.

The advisory does not enumerate a precise package version, release range, or remediation build. Operators should consult the vendor's release notes and security guidance rather than assume a specific version is safe. The exposure condition is functional rather than strictly version-bound: an application is affected whenever untrusted values reach the unescaped query-building paths.

Technical Analysis

The weakness is at the boundary between application data and RediSearch query syntax. Search engines that support rich operators typically require escaping at the boundary where user data crosses into query construction. RediSearch is no exception; its query language admits field qualifiers, wildcards, grouping, and negation that, if injected, can dramatically alter the meaning of a query.

In this case, the repository implements escaping on one path but not on others. The inconsistency is the substantive defect: the fix addressed the symptom on a single call site while leaving siblings vulnerable. Anyone familiar with query-injection patterns will recognize that partial escaping is functionally equivalent to no escaping once a request reaches an unescaped node in the call graph.

A successful injection does not yield arbitrary code execution against Redis. It produces a manipulated RediSearch query. The downstream effect depends on what the application does with the broadened results: cross-conversation disclosure if the application trusts the search to enforce conversation isolation, or unexpected behavior if the application uses RediSearch to drive deletion, tagging, or retrieval flows.

Mitigation

  1. Apply the vendor-supplied security update once fixed versions are confirmed against your installed build. Because the advisory does not state a remediation version, treat the patch status as unresolved until the vendor clarifies the affected and fixed releases.

  1. Until a patch is available, validate or reject user-controlled content and metadata before they are handed to RedisChatMemoryRepository search methods. Allowlists and explicit character-class checks are preferable to denylists.

  1. Audit every code path that constructs a RediSearch query inside the repository and verify that the same correct escaping mechanism is applied uniformly to both conversation content and metadata.

  1. Enforce conversation ownership and tenant isolation in the data-access layer rather than relying solely on the scope of a RediSearch query. A manipulated query must not be sufficient to expose messages that the caller would not otherwise be authorized to read.

  1. Monitor RediSearch traffic for signs of injected operators in values that should have been literal text, and for queries whose result sets span conversations in ways that would not be expected from normal application flow.

  1. Where the product cannot be updated, consider replacing the affected search implementation with one that parameterizes every RediSearch value or refuses any value containing RediSearch metacharacters.

Indicators and Detection Considerations

The advisory does not provide a published detection signature. Defensive monitoring should focus on RediSearch queries that contain operators where plain text was expected, on result sets whose scope exceeds the caller's conversation identifier, and on patterns of malformed query syntax that could correspond to fuzzing or probing. None of these are confirmed indicators of compromise for CVE-2026-59348; they are general precautions relevant to any RediSearch-backed component that handles untrusted input.

Outlook

Incomplete fixes are among the more preventable classes of injection defect, and CVE-2026-59348 fits that pattern. The vulnerability is unlikely to be weaponized at scale because exploitation requires the application to specifically route untrusted values into the affected search methods, but it is meaningful for any deployment that stores multi-tenant or multi-conversation chat history and uses this repository as its access layer. Operators serving customer-facing chat memory features should treat this advisory as a signal to review how their queries reach RediSearch and to confirm with the vendor that their installed build includes a complete fix.

منابع

·
← اخبار