Junglewise Threat Intelligence

CVE-2026-55405: LangChain4j SQL injection in MariaDB and pgvector embedding stores

CVE-2026-55405 · Severity: high · CVSS 7.6 · Published 2026-07-10

Executive brief

LangChain4j is a Java library used to build applications powered by Large Language Models (LLMs). A security flaw in how the library handles database queries could allow an attacker to bypass security controls and run unauthorized commands on the underlying database. This could result in the theft of sensitive data, the deletion of records, or a disruption of service.

Technical details

A SQL injection vulnerability exists in the MariaDB and pgvector embedding stores of LangChain4j. The root cause is the improper neutralization of special elements (CWE-89) where metadata filter keys (and string values in MariaDB) are built using direct string concatenation without adequate escaping. An attacker can provide a crafted metadata key via EmbeddingSearchRequest.filter() to break out of the SQL context. This enables the execution of arbitrary SQL during search and removeAll(Filter) operations. Impact includes blind data exfiltration, denial of service via sleep functions, and unauthorized row deletion. The issue is fixed in versions 1.2.1-beta8, 1.5.1-beta11, 1.11.8-beta19, and 1.16.3-beta26.

Affected products

  • langchain4j langchain4j-mariadb < 1.2.1-beta8, >= 1.3.0-beta9 < 1.5.1-beta11, >= 1.6.0-beta12 < 1.11.8-beta19, >= 1.12.1-beta21 < 1.16.3-beta26
  • langchain4j langchain4j-pgvector < 1.2.1-beta8, >= 1.3.0-beta9 < 1.5.1-beta11, >= 1.6.0-beta12 < 1.11.8-beta19, >= 1.12.1-beta21 < 1.16.3-beta26

Timeline

  • 2026-07-10: advisory: NVD publication date
  • 2026-06-15: patched: Fix commits pushed to GitHub repository

References