Skip to content

fix: Fix SQL injection / LLM Prompt Injection vulnerability causing unauthorized queries#1188

Merged
ulleo merged 1 commit into
mainfrom
pr@main@fix
Jun 11, 2026
Merged

fix: Fix SQL injection / LLM Prompt Injection vulnerability causing unauthorized queries#1188
ulleo merged 1 commit into
mainfrom
pr@main@fix

Conversation

@ulleo

@ulleo ulleo commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Security hardening:

  • Add SQLBOT_ALLOW_METADATA_QUERIES config option, disable SHOW/DESCRIBE/EXPLAIN by default
  • Add table whitelist check, use sqlglot to parse actual SQL table names and compare with authorized table list
  • Add dangerous function check, block LOAD_FILE, INTO OUTFILE, EXEC etc. by database type
  • Improve check_sql_read to return specific error reasons for better debugging

…nauthorized queries

Security hardening:
- Add SQLBOT_ALLOW_METADATA_QUERIES config option, disable SHOW/DESCRIBE/EXPLAIN by default
- Add table whitelist check, use sqlglot to parse actual SQL table names and compare with authorized table list
- Add dangerous function check, block LOAD_FILE, INTO OUTFILE, EXEC etc. by database type
- Improve check_sql_read to return specific error reasons for better debugging
@ulleo ulleo merged commit 5b94406 into main Jun 11, 2026
3 checks passed
@ulleo ulleo deleted the pr@main@fix branch June 11, 2026 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant