AI
LLM-Powered Approach Uncovers 55 New Database Bugs Using AI-Generated SQL
Researchers developed ShQveL, a system that pairs large language models with SQL test generators to discover previously unknown vulnerabilities in major database systems.
Researchers have introduced a novel method for stress-testing database systems by combining automated SQL generators with artificial intelligence. The new approach, called ShQveL, successfully identified 55 previously unknown bugs across five major database management systems, with 50 of those flaws rapidly patched after disclosure.
The Problem with Manual SQL Testing#
Traditional database testing relies on manually built SQL code generators that systematically create test queries to hunt for bugs. While effective, these hand-crafted generators have a fundamental limitation: they can only test features their creators anticipated and explicitly programmed. This constraint means many real-world SQL capabilities remain untested, leaving potential vulnerabilities undiscovered.
How ShQveL Works#
ShQveL bridges this gap by enlisting large language models to expand the range of SQL features covered during testing. The system employs SQL sketches—incomplete SQL statements with placeholder segments—which the LLM fills in with valid SQL code. This technique allows the researchers to systematically integrate new SQL patterns discovered through interaction with the AI into their existing generators, creating richer and more diverse test cases without requiring manual code rewrites.
Testing Results and Impact#
When deployed against production database systems, ShQveL's expanded test coverage uncovered 55 distinct previously unreported bugs. The rapid remediation of 50 of these issues demonstrates how critical such testing is for maintaining database reliability and security in real-world deployments.

