Files
anything-llm/server
Timothy Carambat 334ce052f0 Fix SQL injection in SQL Agent plugin via parameterized queries
Replace string concatenation with parameterized queries in all database
connectors to prevent SQL injection through LLM-generated table names.

Changes:
- PostgreSQL: Use $1, $2 placeholders with pg client parameterization
- MySQL: Use ? placeholders with mysql2 execute() prepared statements
- MSSQL: Use @p0 placeholders with request.input() parameterization
- Update handlers to support parameterized query objects
- Add formatQueryForDisplay() for logging parameterized queries

Security: Mitigates potential SQL injection when LLM passes unsanitized
user input as table_name parameter to getTableSchemaSql/getTablesSql.
GHSA-jwjx-mw2p-5wc7
2026-03-12 21:56:57 -07:00
..
2026-03-05 16:32:45 -08:00
2026-02-02 10:56:58 -08:00
2026-02-11 08:53:44 -08:00
2024-01-08 15:31:06 -08:00
2026-02-02 10:56:58 -08:00
2026-02-02 10:56:58 -08:00
2024-01-08 15:31:06 -08:00
2023-08-23 19:15:07 -07:00
2026-03-05 16:32:45 -08:00