LangChain fixes RediSearch filter injection vulnerability in @langchain/redis
LangChain: RediSearch Filter Injection via Unescaped Tag/Text Values
A GitHub security advisory discloses that @langchain/redis does not properly escape values used to construct RediSearch TAG and TEXT structured filters. An attacker who can control values passed to these filters can inject RediSearch syntax to alter or broaden the scope of search queries. Versions 1.1.0 and earlier are affected; if an application uses attacker-influenced filters as tenant or document access boundaries, indexed documents outside the intended scope may be exposed. The fix is in version 1.1.1 and later, and includes escaping RediSearch special characters, validating field names and structured filter types, and extending these protections to streaming filter constructors and custom schema query construction. The issue was reported by @thesanjok and @shovanchakraborty.
LangChain's Redis integration can be injected with query syntax because filter values are not escaped; applications using this component for tenant isolation can investigate versions accordingly.