drizzle-team / drizzle-team/drizzle-orm
sql-js session interpolates config.behavior into raw SQL without validation
Open
- Dominant language
- TypeScript
- Stars
- 35.8k
- Forks
- 1.6k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 4
Description
drizzle-orm/src/sql-js/session.ts:55 does sql.raw(\`begin \${config.behavior}\`). The behavior field is meant to be 'deferred', 'immediate', or 'exclusive', but there's no validation before it hits raw SQL.
If an app passes user input into SQLiteTransactionConfig.behavior, that goes straight into the query. Adding a whitelist check would close this off.
Contributor guide
Assessment
This issue has not been assessed yet.