LangGraph: Namespace labels containing `.` reach other namespaces in Postgres and SQLite stores
影響パッケージ
| 種類 | パッケージ | 影響を受ける版 | 直った版 |
|---|---|---|---|
| langchain-ai | langgraph | — | — |
| langchain-ai | langgraph-checkpoint-postgres | — | — |
| langchain-ai | langgraph-checkpoint-sqlite | — | — |
| pip | langgraph-checkpoint-postgres |
3.1.3 未満 |
3.1.3 |
| pip | langgraph-checkpoint-sqlite |
3.1.2 未満 |
3.1.2 |
| PyPI | langgraph-checkpoint-postgres |
3.1.3 未満 |
3.1.3 |
| PyPI | langgraph-checkpoint-sqlite |
3.1.2 未満 |
3.1.2 |
原文の説明 取得元が公開している説明をそのまま載せています (多くは英語)。
Summary
The Postgres and SQLite stores save a namespace as its labels joined with ., so ("tenant", "bob") and ("tenant.bob",) map to the same stored namespace. put rejected labels containing ., but get, search, delete, list_namespaces, their async versions, and ops passed directly to batch/abatch did not. A caller that could pass such a label could read, overwrite or delete items in another namespace.
Details
BaseStore checked namespace labels only in put/aput. The other methods passed the namespace on unchecked, and batch/abatch checked nothing, including the PutOp items inside them. PostgresStore, AsyncPostgresStore, SqliteStore and AsyncSqliteStore turn a namespace into text with ".".join(namespace), so a label containing . resolved to the namespace whose labels it spells out:
get(("tenant.bob",), key),search(("tenant.bob",))andlist_namespaces(prefix=("tenant.bob",))returned data stored under("tenant", "bob").delete(("tenant.alice",), key)deleted the item stored under("tenant", "alice").batch([PutOp(("tenant.bob",), key, value)])overwrote the item stored under("tenant", "bob").
All releases of langgraph-checkpoint-postgres before 3.1.3 and langgraph-checkpoint-sqlite before 3.1.2 are affected. InMemoryStore compares namespaces as tuples and is not affected.
Impact
You may be affected if you use one of these stores, rely on namespaces to keep users or tenants apart, and l…
出典: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
参照URL
- package github.com
- web security-advisories@github.com
- web security-advisories@github.com
- web security-advisories@github.com
- web github.com
- web github.com
- web github.com