Skip to content
langchain-ai/langgraphjs·Indexed by this site · Originally published· Event →· Its place in the scan record →

LangGraph advisory: MongoDBStore query expression injection, possible out-of-bounds data reads in shared multi-tenant scenarios

MongoDBStore query expression injection allows cross-tenant data exposure

AI summary

LangChain's @langchain/langgraph-checkpoint-mongodb has a query expression injection vulnerability in versions 1.3.0 and later but before 1.5.1: MongoDBStore does not validate values passed by the caller before splicing them into MongoDB queries and aggregations, so crafted values are executed by the database as query expressions rather than literals, allowing attackers to read data outside the intended namespace boundary; when server-side JavaScript is enabled, JavaScript can also be executed on the database server. The advisory says applications that pass user-controllable input into shared or multi-tenant storage are affected, the issue is fixed in 1.5.1, and upgrading to 1.5.1 or higher is recommended; if immediate upgrade is not possible, reject user values that are not plain strings or numbers before passing them to storage operations.

Read originalgithub.com