@langchain/redis: LangChain: RediSearch Filter Injection via Unescaped Tag/Text Values
What fixes it
- 1.1.1@langchain/redis, npmGitHub
npm install @langchain/redis@1.1.1
A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.
Description
Summary
@langchain/redis did not properly escape values used to construct structured RediSearch TAG and TEXT filters. An application that passes attacker-controlled values into these filters could allow the attacker to alter the resulting search query.
Affected versions
@langchain/redis versions through 1.1.0 are affected.
Impact
An attacker who can control values passed to the affected structured TAG or TEXT filters can inject RediSearch syntax and alter or broaden the resulting search query. In applications that use an attacker-influenceable filter as a tenant or document-access boundary, this may expose indexed documents outside the attacker's intended scope.
Remediation
Upgrade to @langchain/redis 1.1.1 or later.
The fix escapes RediSearch special characters, validates field names and structured filter types, and applies these protections across fluent filter builders and custom-schema query construction.
Credits
Thanks to @thesanjok and @shovanchakraborty for reporting this issue.
Text from GitHub Advisory Database
Affected versions 4
- @langchain/redis, npm<= 1.1.0GitHub
- langchainjsaffected: < 1.1.1CVE List
- redisaffected: < 1.1.1CVE List
- @langchain/redis, npmfrom first release, fixed in 1.1.1OSV
References 6
- github.com/langchain-ai/langchainjs/commit/880e3969ea643a2147777a4d5e8bd606a697edf7Fixvia CVE List
- github.com/langchain-ai/langchainjs/releases/tag/@langchain/redis@1.1.1Fixvia CVE List
- github.com/langchain-ai/langchainjs/security/advisories/GHSA-5x6v-p487-7qh2Advisoryvia CVE List
- github.com/advisories/GHSA-5x6v-p487-7qh2Advisoryvia GitHub
- nvd.nist.gov/vuln/detail/CVE-2026-105799Referencevia GitHub
- github.com/langchain-ai/langchainjs/pull/10701Referencevia CVE List