SQL filter injection in the default LanceDB memory backend
Description
In crewai versions before 1.15.29, the default LanceDB memory backend inserted caller-controlled scope and record ID values into SQL filter expressions without properly escaping them. In applications that derive explicit memory scopes from input a tenant can influence, an authenticated user could read or delete memory records belonging to other scopes.
Affected versions
crewai versions before 1.15.29 when using the default LanceDB memory backend with attacker-influenced explicit memory scopes.
Resolution
Upgrade to crewai 1.15.29 or later. The fix escapes scope and ID values in LanceDB filters (commit 40bb2d3b5, pull request #7820). Applications should keep tenant identifiers under server control and review how they map those identifiers to memory scopes.
Credit
Reported by Shay Sakazi (@shaysakazi).
A CVE has been requested through GitHub. Its identifier is pending and will be added when assigned.