# CVE-2026-55405: LangChain4j: SQL injection via metadata filters in langchain4j-mariadb and langchain4j-pgvector

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.6
- **CVSS:** 7.6 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: Low; Availability impact: Low
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, login needed
- **EPSS:** 0.47% (percentile 33, 2026-11-26)
- **CWE:** CWE-89
- **Aliases:** GHSA-2mfg-cc43-9pcj
- **Published:** 2026-06-17T18:39:56.000Z
- **Modified:** 2026-07-13T18:09:30.873Z

## Who should check

- Projects that depend on Maven package dev.langchain4j:langchain4j-mariadb (\< 1.2.1-beta8)
- Projects that depend on Maven package dev.langchain4j:langchain4j-pgvector (\< 1.2.1-beta8)
- Anyone running langchain4j \< 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

## Description

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.

## Affected and fixed versions

- Maven `dev.langchain4j:langchain4j-mariadb`: affected \< 1.2.1-beta8; fixed 1.2.1-beta8, 1.5.1-beta11, 1.11.8-beta19, 1.16.3-beta26 (osv)
- Maven `dev.langchain4j:langchain4j-pgvector`: affected \< 1.2.1-beta8; fixed 1.2.1-beta8, 1.5.1-beta11, 1.11.8-beta19, 1.16.3-beta26 (osv)
- langchain4j: \< 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 (cvelist)

## Mitigation

- Upgrade dev.langchain4j:langchain4j-mariadb to one of 1.2.1-beta8, 1.5.1-beta11, 1.11.8-beta19, 1.16.3-beta26 (or later in the same release line).
- Upgrade dev.langchain4j:langchain4j-pgvector to one of 1.2.1-beta8, 1.5.1-beta11, 1.11.8-beta19, 1.16.3-beta26 (or later in the same release line).

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-55405. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-55405.md
Affected: dev.langchain4j:langchain4j-mariadb < 1.2.1-beta8; dev.langchain4j:langchain4j-pgvector < 1.2.1-beta8
Fixed in: 1.2.1-beta8, 1.5.1-beta11, 1.11.8-beta19, 1.16.3-beta26

Steps:
1. Search this machine and project for dev.langchain4j:langchain4j-mariadb (Maven), dev.langchain4j:langchain4j-pgvector (Maven), langchain4j: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-55405 being exploited?

There is no confirmed exploitation: CVE-2026-55405 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.47% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-55405?

High: CVSS 7.6 (v3.1, scored by CNA). Remote, login needed.

### Which versions are affected by CVE-2026-55405?

dev.langchain4j:langchain4j-mariadb \< 1.2.1-beta8; dev.langchain4j:langchain4j-pgvector \< 1.2.1-beta8.

### Is there a fix for CVE-2026-55405?

Yes. Fixed in 1.2.1-beta8, 1.5.1-beta11, 1.11.8-beta19, 1.16.3-beta26. Upgrade dev.langchain4j:langchain4j-mariadb to one of 1.2.1-beta8, 1.5.1-beta11, 1.11.8-beta19, 1.16.3-beta26 (or later in the same release line). Upgrade dev.langchain4j:langchain4j-pgvector to one of 1.2.1-beta8, 1.5.1-beta11, 1.11.8-beta19, 1.16.3-beta26 (or later in the same release line).

### How do I check if I'm affected by CVE-2026-55405?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/langchain4j/langchain4j/security/advisories/GHSA-2mfg-cc43-9pcj>
- patch: <https://github.com/langchain4j/langchain4j/commit/13a0698bdfaf105d8aaf0367881df51358596219>
- patch: <https://github.com/langchain4j/langchain4j/commit/1bc1f60aa58ef5c3c1703caf73362482480351cf>
- patch: <https://github.com/langchain4j/langchain4j/commit/8805d5d128694302f1b0a2650174186862f669e7>
- patch: <https://github.com/langchain4j/langchain4j/commit/ce96291dfb243c7f6753b5d65c7a77914642314f>
- patch: <https://github.com/langchain4j/langchain4j/commit/f14a10ce77e4ea1b8277f67d6a81f46abd7a5bc2>
- other: <https://github.com/langchain4j/langchain4j/releases/tag/1.16.3>
- other: <https://github.com/langchain4j/langchain4j>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-55405>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-2mfg-cc43-9pcj> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2026-55405> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-55405>
