Incident response on call, 24/7: +385 98 1900 984NewIR Retainer: a team on contract before an attack
HR · EN
High 8.1CVE-2026-145153

LangChain4j: injection in embedding store metadata filters

Published 04/12/2026 · Updated 04/12/2026 · langchain4j-pgvector

Summary

LangChain4j before 1.5.4-beta11, 1.11.12-beta19, 1.19.4-beta29 and 1.23.0-beta33 contains an injection vulnerability in embedding store metadata filters. Non-String filter values are written into queries via toString() without escaping (CWE-89, CWE-943). Affected stores include pgvector, MariaDB, Milvus, MongoDB Atlas and Chroma.

The attack is network-based, requires no authentication and no user interaction, but has high complexity: the attacker must control loosely typed filter values, such as nested Lists or Maps from request JSON or LLM tool output. CVSS 3.1 score is 8.1 (high).

Successful exploitation allows injecting SQL or query operators to read other tenants' documents or delete rows via removeAll, with high impact on confidentiality, integrity and availability. The vulnerability is not listed in the CISA KEV catalog.

Who is affected

Organizations building Java applications (e.g. RAG or multi-tenant AI systems) using LangChain4j modules for pgvector, MariaDB, Milvus, MongoDB Atlas or Chroma.

What to do

  1. Upgrade LangChain4j modules to the fixed version for your branch: 1.5.4-beta11, 1.11.12-beta19, 1.19.4-beta29 or 1.23.0-beta33.
  2. For MongoDB Atlas and Chroma modules and branches not listed in the record, check fixed versions in the official advisory GHSA-6wgf-c23j-fj2v.
  3. Review dependencies (Maven/Gradle) across projects to identify affected modules and versions.
  4. Review code that builds metadata filters from user input or LLM tool output and ensure only expected scalar types are passed.
  5. Review database and store logs for unexpected queries or deletions and verify tenant data isolation.

Affected products and versions

langchain4j langchain4j-pgvector< 1.5.4-beta11Fixed in: 1.5.4-beta11
langchain4j langchain4j-pgvector1.6.0-beta12 – < 1.11.12-beta19Fixed in: 1.11.12-beta19
langchain4j langchain4j-pgvector1.12.1-beta21 – < 1.19.4-beta29Fixed in: 1.19.4-beta29
langchain4j langchain4j-pgvector1.20.0-beta30 – < 1.23.0-beta33Fixed in: 1.23.0-beta33
langchain4j langchain4j-mariadb< 1.5.4-beta11Fixed in: 1.5.4-beta11
langchain4j langchain4j-mariadb1.6.0-beta12 – < 1.11.12-beta19Fixed in: 1.11.12-beta19
langchain4j langchain4j-mariadb1.12.1-beta21 – < 1.19.4-beta29Fixed in: 1.19.4-beta29
langchain4j langchain4j-mariadb1.20.0-beta30 – < 1.23.0-beta33Fixed in: 1.23.0-beta33
langchain4j langchain4j-milvus< 1.5.4-beta11Fixed in: 1.5.4-beta11
langchain4j langchain4j-milvus1.6.0-beta12 – < 1.11.12-beta19Fixed in: 1.11.12-beta19

CVSS vector, explained

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Attack vector
Network (from the internet)
Attack complexity
High
Privileges required
None (no login)
User interaction
Not required
Scope
Vulnerable component only
Confidentiality
High impact
Integrity
High impact
Availability
High impact

Weakness type (CWE)

  • CWE-89 Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
  • CWE-943 Improper Neutralization of Special Elements in Data Query Logic

References

Sources: CVE.org (CNA and CISA ADP), CISA KEV, FIRST EPSS. Always check the vendor's official advisory.