The column names from filter_spec are directly interpolated into the SQL query without sanitization. This creates a SQL injection vulnerability. An attacker could pass malicious column names that break out of the query structure. Validate column names against the actual table schema or use a whitelist approach.
Originally posted by @Copilot in #3 (comment)