CVE-2026-59415 in Spring AI
Summary
by MITRE • 11/24/2026
TypesenseVectorStore is vulnerable to a document ID injection in its delete operation that can cause unintended documents to be deleted.
TypesenseVectorStore.doDelete(List<String>) builds a Typesense filter_by expression by raw string concatenation of caller-supplied document IDs into the form id: [id1,id2,...] . The Typesense id field uses bare (unquoted) values in this list form with no escaping mechanism. An ID containing characters with syntactic meaning in the Typesense filter grammar — such as a comma ( , ), a closing bracket ( ] ), or operator tokens ( || , && ) — can break out of the list literal and alter the structure of the filter expression.
An attacker who controls a document ID passed to the delete operation can use this to delete documents other than the intended ones (comma injection), or to construct a filter that matches every document in the collection (operator breakout), resulting in unintended bulk deletion.
Applications that pass externally supplied or user-controlled document IDs to VectorStore.delete(List<String>) backed by TypesenseVectorStore are affected.
Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.
Analysis
by VulDB Data Team • 11/24/2026
The vulnerability identified within the TypesenseVectorStore component represents a critical server-side injection flaw, specifically categorized under CWE-77 as Command Injection via improper neutralization of special elements used in a command or syntax. This issue arises from the implementation of the doDelete method, which constructs filter expressions for the underlying Typesense database by directly concatenating user-supplied document identifiers into a string format without any sanitization or escaping mechanisms. The resulting expression follows the pattern id: [id1,id2,...], relying on the assumption that input values are safe and contain only alphanumeric characters. However, because the Typesense filter grammar allows for bare unquoted values in list forms, this lack of validation creates an exploitable vector where malicious actors can manipulate the structure of the query itself rather than just its data payload.
From a technical perspective, the core flaw lies in the failure to validate or escape special characters that hold syntactic significance within the Typesense filter language. Specifically, characters such as commas, closing brackets, and logical operators like OR (||) AND (&&) are treated as structural delimiters rather than literal data points when an attacker controls the input. By injecting these characters into a document ID field, an adversary can break out of the intended list literal context. For instance, inserting a comma allows the injection of additional filter criteria or IDs that were not originally specified by the application logic. More severely, injecting logical operators enables the construction of tautological conditions that match every record in the collection, effectively bypassing any intended scope limitations imposed by the original delete request.
The operational impact of this vulnerability is severe and potentially catastrophic for data integrity. An attacker who can control or influence document IDs passed to the VectorStore.delete method can achieve unintended bulk deletion of documents. This goes beyond simple unauthorized access; it constitutes a destructive action that leads to significant data loss. In scenarios where an application allows users to specify identifiers for batch operations, such as deleting items from a shopping cart or removing specific entries in a user profile system, this flaw could be leveraged to wipe out entire collections of data. The ability to match every document means that the scope of destruction is limited only by the permissions of the database account used by the application, potentially resulting in total loss of critical information stored within the affected Typesense index.
This vulnerability aligns with MITRE ATT&CK technique T1485, specifically Volume Data Destruction, where an adversary aims to destroy data on a large scale rather than encrypting it for ransom or stealing it for espionage. The attack vector typically involves indirect command execution through application logic that processes user input as part of system commands or queries. Defense in depth strategies must be employed immediately to mitigate this risk. Primary mitigation requires implementing strict allowlist validation for all document IDs before they are passed to the delete operation, ensuring that only expected alphanumeric characters and specific safe delimiters are accepted. Additionally, parameterized queries should be utilized if supported by the Typesense client library, or explicit escaping functions must be applied to neutralize special characters like commas and brackets. Applications relying on this component should also implement robust error handling and logging to detect anomalous query patterns that may indicate an ongoing exploitation attempt.