The vulnerability is a classic SQL injection caused by constructing raw SQL queries using Python's f-strings, where table and schema names are directly embedded into the query string. The affected component is described as the 'Table Object Handler', and the analysis of the patch confirms this, as multiple functions across different modules that handle database table operations were vulnerable.
The root cause is the reliance on string formatting (f"...{variable}...") to create SQL statements. Even though a quoting function (quote_schema_and_table) was used, this approach is inherently unsafe and was clearly insufficient to prevent injection. An attacker could likely bypass the quoting by providing specially crafted schema or table names.
The patch systematically replaces this unsafe pattern with the use of SQLAlchemy's SQL Expression Language. Instead of building strings, the code now creates Table objects and uses constructs like select(), table.delete(), and DropTable(). SQLAlchemy then safely generates the final SQL query, correctly quoting and escaping identifiers to prevent SQL injection. The widespread nature of this change across the codebase indicates a systemic issue rather than an isolated mistake.
Any runtime profile during exploitation would show one of the identified vulnerable functions (VerticaDBDriver.has_table, TablePrep.prep_table_for_load, TableRecordsSource.to_dataframes_source, SpectrumRecordsTarget.prep_bucket) executing a malformed SQL query constructed from user-provided input.