Security brief
Historical advisory: LangChain SQLDatabaseChain could expose database information
REVIEWCVE-2023-36189 concerns SQL injection through SQLDatabaseChain. The model’s output should not become unrestricted database authority.
What happened
OSV’s July 2023 advisory describes SQL injection in LangChain’s SQLDatabaseChain component that could allow a remote attacker to obtain sensitive information. It records 0.0.247 as the fixed package version.
The lasting design issue is the authority given to generated queries. An application can accept a natural-language question while its database account has access to much more information than the user should receive.
When reviewing an older deployment, check both the affected package and database permissions. As a defensive design measure, limit database access to the records and operations the application actually needs. That recommendation complements patching; it does not establish that a particular deployment was exploited.
Who should check?
Maintainers of legacy applications using LangChain SQLDatabaseChain.
Next step
Review CVE-2023-36189, upgrade affected packages, and restrict database permissions.
What we know
- Advisory fixed version
- 0.0.247
What remains unknown
- Open question
- The sources reviewed do not establish whether your deployment was exploited.
Source references
-
OSV
Technical details
- CVE
CVE-2023-36189