CVE-2026-145153: Injection Vulnerability in LangChain4j
CVE-2026-145153 affects versions of LangChain4j with a critical injection vulnerability.

// on this page (8)
Introduction
The CVE-2026-145153 vulnerability affects LangChain4j, a library used in applications that interact with databases such as MariaDB and MySQL. This vulnerability is classified as critical and allows for the injection of unescaped values into SQL queries.
What happened?
An injection vulnerability was identified in the metadata filtering of storage. The flaw allows attackers controlling loosely typed filter values, such as nested lists or maps from request JSON or LLM tool outputs, to inject SQL or query operators. This can lead to reading documents from other tenants or deleting rows in databases.
How does the vulnerability work?
The vulnerability arises from how LangChain4j processes filter values. When non-String values are passed, the toString() function is used without proper escaping, allowing malicious values to be injected into queries. This flaw can be exploited by attackers to manipulate data in databases such as pgvector, MariaDB, Milvus, MongoDB Atlas, or Chroma.
What is the real impact?
The impact of this vulnerability is significant as it allows an attacker to access sensitive data from other users or delete data without authorization. The severity of the situation is heightened by the possibility that multiple tenants may be affected, compromising the integrity and confidentiality of stored data.
Which versions are affected?
- Before 1.5.4-beta11
- 1.11.12-beta19
- 1.19.4-beta29
- 1.23.0-beta33
How to fix
- Check the version of LangChain4j you are using.
- Update to a patched version as indicated above.
- Test the application after the update to ensure the vulnerability has been resolved.
- Consider reviewing the code to ensure there are no other areas vulnerable to injections.
Mitigation while you update
While updating is not immediately possible, it is recommended to implement strict validations on input values and avoid dynamic queries that may be influenced by uncontrolled inputs. Additionally, monitoring access logs can help identify suspicious activities.
Conclusion
CVE-2026-145153 represents a critical vulnerability that should be addressed urgently. It is essential for users of LangChain4j to update to secure versions to protect their data and the integrity of their applications.
// Fontes
- NVD — CVE-2026-145153 nvd.nist.gov ↗
- CVE.org — CVE-2026-145153 cve.org ↗
- GitHub github.com ↗
- GitHub github.com ↗
- GitHub github.com ↗
- vulncheck.com vulncheck.com ↗