Skip to content

← Actionable
High, CVSS 7.6

LangChain4j: SQL injection via metadata filters in langchain4j-mariadb and langchain4j-pgvector

CVE-2026-55405GHSA-2mfg-cc43-9pcj

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (dev.langchain4j:langchain4j-mariadb 1.16.3-beta26, 1.11.8-beta19, 1.5.1-beta11, 1.2.1-beta8; dev.langchain4j:langchain4j-pgvector 1.16.3-beta26, 1.11.8-beta19, 1.5.1-beta11, 1.2.1-beta8), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

  • Maven dev.langchain4j:langchain4j-mariadb

    Affected
    <= 1.2.0-beta8>= 1.3.0-beta9, <= 1.5.0-beta11>= 1.6.0-beta12, <= 1.11.7-beta19>= 1.12.1-beta21, <= 1.16.2-beta26
    Fixed in
    1.2.1-beta8, 1.16.3-beta26, 1.5.1-beta11, 1.11.8-beta19
  • Maven dev.langchain4j:langchain4j-pgvector

    Affected
    <= 1.2.0-beta8>= 1.3.0-beta9, <= 1.5.0-beta11>= 1.6.0-beta12, <= 1.11.7-beta19>= 1.12.1-beta21, <= 1.16.2-beta26
    Fixed in
    1.2.1-beta8, 1.16.3-beta26, 1.5.1-beta11, 1.11.8-beta19

Sources

  • GitHub Advisory Database and maintainer security advisories on GitHub

    GitHub-reviewed advisory GHSA-2mfg-cc43-9pcj lists affected ranges: Maven dev.langchain4j:langchain4j-mariadb >=0 =1.3.0-beta9 =1.6.0-beta12 =1.12.1-beta21 =0 =1.3.0-beta9 =1.6.0-beta12 =1.12.1-beta21 <=1.16.2-beta26

    VerifiedObserved Structured GitHub Advisory Database record (type=reviewed) from the GitHub REST API.

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS
7.6 · CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L
EPSS
  • CVE-2026-55405: 0.47% estimated exploitation activity in the next 30 days; percentile 41.06 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

Summary 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. Details pgvector — JSON mode (default, COMBINEDJSON / COMBINEDJSONB). JSONFilterMapper places the key inside a single-quoted SQL literal (the JSON key of the - operator) with no escaping: (metadata-'<key')::text A key containing a single quote breaks out, e.g. metadataKey("')::text IS NOT NULL OR pgsleep(1) IS NOT NULL --") injects a live pgsleep(1) (observable as a delay; exploitable for blind data extraction). pgvector — column mode (COLUMNPERKEY). ColumnFilterMapper used the key as a bare, unquoted, unvalidated SQL identifier (<key::<type), so a key such as 1=1 OR true -- injects directly.…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 1 · created ·

    Published from ghsa record GHSA-2mfg-cc43-9pcj

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2026-55405

Advisory: LangChain4j: SQL injection via metadata filters in langchain4j-mariadb and langchain4j-pgvector
IDs: CVE-2026-55405, GHSA-2mfg-cc43-9pcj
Record: https://patchnext.com/advisories/cve-2026-55405 (revision 1, source checked 26 Oct 2026, 16:54 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: High (CVSS 7.6)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: dev.langchain4j:langchain4j-mariadb 1.16.3-beta26, 1.11.8-beta19, 1.5.1-beta11, 1.2.1-beta8; dev.langchain4j:langchain4j-pgvector 1.16.3-beta26, 1.11.8-beta19, 1.5.1-beta11, 1.2.1-beta8. A vendor fix does not mean a deployment is fixed.

## Affected components
- Maven dev.langchain4j:langchain4j-mariadb: affected <= 1.2.0-beta8; >= 1.3.0-beta9, <= 1.5.0-beta11; >= 1.6.0-beta12, <= 1.11.7-beta19; >= 1.12.1-beta21, <= 1.16.2-beta26; fixed in 1.2.1-beta8, 1.16.3-beta26, 1.5.1-beta11, 1.11.8-beta19
- Maven dev.langchain4j:langchain4j-pgvector: affected <= 1.2.0-beta8; >= 1.3.0-beta9, <= 1.5.0-beta11; >= 1.6.0-beta12, <= 1.11.7-beta19; >= 1.12.1-beta21, <= 1.16.2-beta26; fixed in 1.2.1-beta8, 1.16.3-beta26, 1.5.1-beta11, 1.11.8-beta19

## Suggested inspection (read-only)
- Maven dev.langchain4j:langchain4j-mariadb: check the installed version with your package manager.
- Maven dev.langchain4j:langchain4j-pgvector: check the installed version with your package manager.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on dev.langchain4j:langchain4j-mariadb, dev.langchain4j:langchain4j-pgvector.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://github.com/advisories/GHSA-2mfg-cc43-9pcj (GitHub-reviewed advisory GHSA-2mfg-cc43-9pcj lists affected ranges: Maven dev.langchain4j:langchain4j-mariadb >=0 =1.3.0-beta9 =1.6.0-beta12 =1.12.1-beta21 =0 =1.3.0-beta9 =1.6.0-beta12 =1.12.1-beta21 <=1.16.2-beta26)

Commands are suggestions: review each one before running it.

Loading voting…