CVE-2026-55405 is a SQL injection vulnerability in the Java LangChain4j framework's pgvector and MariaDB embedding stores, where metadata filter keys are concatenated unsanitized into SQL queries — a critical flaw when filter keys derive from LLM-generated output, as is common in agentic RAG pipelines. With CVSS 7.6 (Network/Low-Complexity/Low-Privilege), 312 downstream dependents, and no public exploit yet, the blast radius is moderate but growing as langchain4j adoption in enterprise Java stacks increases. The attack enables blind SQL injection for data exfiltration (timing via pg_sleep), denial-of-service, and arbitrary record deletion via the removeAll(Filter) path — a data-destruction vector that is particularly dangerous in production vector indexes. Upgrade langchain4j-pgvector and langchain4j-mariadb to version 1.2.1-beta8 immediately; if patching is delayed, restrict all metadata filter keys to a hard-coded developer-defined allowlist at the application boundary.
What is the risk?
High risk for Java-based RAG deployments using langchain4j with pgvector or MariaDB backends, particularly any application where filter keys are influenced by user input or LLM output. CVSS 7.6 reflects Network-accessible, Low-complexity exploitation requiring only Low privileges — meaning any authenticated user or LLM-driven agent with access to the search or removeAll API can trigger the injection. The absence of a public exploit and no CISA KEV listing currently limits immediate mass exploitation, but the pattern (LLM-generated filter → unescaped SQL) is intuitive to exploit once the advisory is public. Organizations running agentic Java applications where the LLM constructs metadata filters dynamically face the highest exposure.
How does the attack unfold?
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| LangChain | maven | <= 1.2.0-beta8 | 1.2.1-beta8 |
| 143.8K
OpenSSF 5.8 3.0K dependents
Pushed yesterday 24% patched
~209d to patch
Full package profile →
| |||
| pgvector | maven | <= 1.2.0-beta8 | 1.2.1-beta8 |
How severe is it?
What is the attack surface?
What should I do?
4 steps-
PATCH
Upgrade langchain4j-pgvector and langchain4j-mariadb to >= 1.2.1-beta8 (Maven: dev.langchain4j:langchain4j-pgvector:1.2.1-beta8 and dev.langchain4j:langchain4j-mariadb:1.2.1-beta8).
-
WORKAROUND (if patching delayed): Implement an application-layer allowlist that validates all metadata filter keys against a set of known-safe identifiers before passing them to the embedding store. Reject any key not on the allowlist.
-
DETECTION
Monitor PostgreSQL query logs for anomalous execution times (indicative of pg_sleep-based blind injection) and for unexpected DELETE or DROP patterns originating from the embedding store connection. In MariaDB, enable query logging and alert on queries containing backslash sequences in filter contexts.
-
AUDIT
Review all code paths in your application where EmbeddingSearchRequest.filter() is populated with external or LLM-generated input; treat these as untrusted injection surfaces until patched.
What does CISA's SSVC say?
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2026-55405?
CVE-2026-55405 is a SQL injection vulnerability in the Java LangChain4j framework's pgvector and MariaDB embedding stores, where metadata filter keys are concatenated unsanitized into SQL queries — a critical flaw when filter keys derive from LLM-generated output, as is common in agentic RAG pipelines. With CVSS 7.6 (Network/Low-Complexity/Low-Privilege), 312 downstream dependents, and no public exploit yet, the blast radius is moderate but growing as langchain4j adoption in enterprise Java stacks increases. The attack enables blind SQL injection for data exfiltration (timing via pg_sleep), denial-of-service, and arbitrary record deletion via the removeAll(Filter) path — a data-destruction vector that is particularly dangerous in production vector indexes. Upgrade langchain4j-pgvector and langchain4j-mariadb to version 1.2.1-beta8 immediately; if patching is delayed, restrict all metadata filter keys to a hard-coded developer-defined allowlist at the application boundary.
Is CVE-2026-55405 actively exploited?
No confirmed active exploitation of CVE-2026-55405 has been reported, but organizations should still patch proactively.
How to fix CVE-2026-55405?
1. PATCH: Upgrade langchain4j-pgvector and langchain4j-mariadb to >= 1.2.1-beta8 (Maven: dev.langchain4j:langchain4j-pgvector:1.2.1-beta8 and dev.langchain4j:langchain4j-mariadb:1.2.1-beta8). 2. WORKAROUND (if patching delayed): Implement an application-layer allowlist that validates all metadata filter keys against a set of known-safe identifiers before passing them to the embedding store. Reject any key not on the allowlist. 3. DETECTION: Monitor PostgreSQL query logs for anomalous execution times (indicative of pg_sleep-based blind injection) and for unexpected DELETE or DROP patterns originating from the embedding store connection. In MariaDB, enable query logging and alert on queries containing backslash sequences in filter contexts. 4. AUDIT: Review all code paths in your application where EmbeddingSearchRequest.filter() is populated with external or LLM-generated input; treat these as untrusted injection surfaces until patched.
What systems are affected by CVE-2026-55405?
This vulnerability affects the following AI/ML architecture patterns: RAG pipelines, vector databases, agent frameworks, LLM application frameworks.
What is the CVSS score for CVE-2026-55405?
CVE-2026-55405 has a CVSS v3.1 base score of 7.6 (HIGH). The EPSS exploitation probability is 0.35%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0049 Exploit Public-Facing Application AML.T0051.001 Indirect AML.T0085.000 RAG Databases AML.T0101 Data Destruction via AI Agent Tool Invocation Compliance Controls Affected
What are the technical details?
Original Advisory
LangChain4j is a Java library for building LLM-powered applications on the JVM. Prior to 1.2.1-beta8, 1.5.1-beta11, 1.11.8-beta19, and 1.16.3-beta26, the MariaDB and pgvector embedding stores build metadata-filter SQL by string-concatenating filter keys, and in MariaDB string values, directly into the query without adequate escaping. A crafted metadata key in EmbeddingSearchRequest.filter() can break out of its SQL context and inject arbitrary SQL into the statements executed by the stores' search and removeAll(Filter) operations, enabling blind data exfiltration, denial of service via sleep functions, and deletion of arbitrary rows through removeAll(Filter). This issue is fixed in langchain4j-mariadb and langchain4j-pgvector versions 1.2.1-beta8, 1.5.1-beta11, 1.11.8-beta19, and 1.16.3-beta26.
Exploitation Scenario
An attacker interacts with an enterprise Java RAG application — for example, a compliance document search tool — that accepts natural-language queries and uses an LLM to dynamically construct metadata filter keys (e.g., filtering by document category, department, or classification level). The attacker submits a query that causes the LLM to generate a filter key containing a SQL injection payload: `')::text IS NOT NULL OR pg_sleep(5) IS NOT NULL --`. When the application calls embeddingStore.search(request), langchain4j's JSONFilterMapper embeds this key directly into the PostgreSQL query string without escaping, triggering a 5-second delay that confirms blind injection is live. The attacker then iterates with CASE-based boolean extraction to exfiltrate metadata from the vector store — potentially including user IDs, document classifications, and sensitive business metadata stored alongside embeddings. A more destructive variant targets removeAll(Filter) with a crafted key that matches all rows, destroying the production vector index.
Weaknesses (CWE)
CWE-89 Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Primary
CWE-89 Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Primary
CWE-89 Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') CWE-89 — Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'): The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.
- [Architecture and Design] Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid [REF-1482]. For example, consider using persistence layers such as Hibernate or Enterprise Java Beans, which can provide significant protection against SQL injection if used properly.
- [Architecture and Design] If available, use structured mechanisms that automatically enforce the separation between data and code. These mechanisms may be able to provide the relevant quoting, encoding, and validation automatically, instead of relying on the developer to provide this capability at every point where output is generated. Process SQL queries using prepared statements, parameterized queries, or stored procedures. These features should accept parameters or variables and support strong typing. Do not dynamically construct and execute query strings within these features using "exec" or similar functionality, since this may re-introduce the possibility of SQL injection. [REF-867]
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L References
- github.com/advisories/GHSA-2mfg-cc43-9pcj
- github.com/langchain4j/langchain4j/security/advisories/GHSA-2mfg-cc43-9pcj
- github.com/langchain4j/langchain4j/commit/13a0698bdfaf105d8aaf0367881df51358596219
- github.com/langchain4j/langchain4j/commit/1bc1f60aa58ef5c3c1703caf73362482480351cf
- github.com/langchain4j/langchain4j/commit/8805d5d128694302f1b0a2650174186862f669e7
- github.com/langchain4j/langchain4j/commit/ce96291dfb243c7f6753b5d65c7a77914642314f
- github.com/langchain4j/langchain4j/commit/f14a10ce77e4ea1b8277f67d6a81f46abd7a5bc2
- github.com/langchain4j/langchain4j/releases/tag/1.16.3
Timeline
Related Vulnerabilities
CVE-2026-18022 8.8 pgvector: integer wraparound in index build enables RCE
Same package: pgvector CVE-2026-48148 Budibase: SSRF via VectorDB host exposes cloud metadata
Same package: pgvector CVE-2025-5120 10.0 smolagents: sandbox escape enables unauthenticated RCE
Same attack type: Code Execution CVE-2025-53767 10.0 Azure OpenAI: SSRF EoP, no auth required (CVSS 10)
Same attack type: Data Extraction CVE-2025-2828 10.0 LangChain RequestsToolkit: SSRF exposes cloud metadata
Same attack type: Data Extraction