The vulnerability was a SQL injection in the Postgres and TimescaleDB nodes of n8n. The execute method in both nodes used user-provided table and schema names to construct SQL queries without proper sanitization. This allowed an authenticated user with permission to create or modify workflows to execute arbitrary SQL commands against the connected database. The patch for this vulnerability introduced a sanitize function that escapes double quotes and wraps the table and schema names in double quotes, thus preventing the database from interpreting them as SQL commands. The vulnerable functions are PostgresV1.execute and TimescaleDb.execute as they are the entry points for the vulnerable code execution.