The vulnerability, CVE-2026-82526, is a stacked SQL injection in the R2R application, specifically targeting the vector index creation endpoint. The core issue stems from the create_index function within py/core/providers/database/chunks.py. This function is responsible for constructing CREATE INDEX SQL statements but directly interpolates the user-supplied index_name parameter into the SQL query using f-strings without any form of identifier quoting, sanitization, or allowlist validation. This direct interpolation allows an unauthenticated attacker to inject arbitrary SQL code by crafting a malicious index_name value. The base.execute_query function in py/core/providers/database/base.py further enables the severity of this vulnerability. When called by chunks.create_index, base.execute_query uses the simple-query protocol, which permits the execution of multiple semicolon-separated SQL statements. This allows for 'stacked' SQL injection, meaning an attacker can execute not just a single malicious query, but a sequence of arbitrary DDL (Data Definition Language) and DML (Data Manipulation Language) commands. The POST /v3/indices endpoint, handled by a function within py/core/main/api/v3/indices_router.py (likely named create_index or similar, as it's the entry point for index creation), acts as the unauthenticated entry point for this attack. It accepts the index_name parameter, which is then passed to the vulnerable functions, leading to the exploitation. The absence of authentication and input validation at this endpoint makes the vulnerability easily accessible and highly critical, potentially leading to full database compromise under the PostgreSQL superuser account, as described in the vulnerability details. The analysis relies heavily on the detailed descriptions provided in the GitHub issue #2309, which explicitly names the affected files, functions, and the root cause, including the specific interpolation method and the role of execute_query in enabling stacked injections. Although no direct commit was found, the issue description itself provides sufficient detail to identify the vulnerable functions and their roles in the exploitation chain.