Incident response on call, 24/7: +385 98 1900 984NewIR Retainer: a team on contract before an attack
HR · EN
High 7.5CVE-2026-136506

psqlODBC: SQL injection via names the driver inserts into its own queries

Published 25/11/2026 · Updated 25/11/2026 · PostgreSQL psqlODBC

Summary

psqlODBC (the PostgreSQL ODBC driver) builds its own SQL queries from object names and inserts them without escaping or qualification: the database name in SQLForeignKeys(), the current schema name in catalog functions, the table name in the currtid2() call, column names in SQLSetPos() and SQLBulkOperations() INSERT/UPDATE statements, cursor names (SQLSetCursorName() or refcursors with FetchRefcursors=1), parameter names (SQL_DESC_NAME) in procedure calls, and the = operator in an OID comparison in SQLColumns(), resolved by the server via search_path. The column names are a variant of CVE-2026-120065; the fix in 18.00.0006 does not cover the UPDATE SET list or the SQL_ADD INSERT column list, so 18.00.0006 remains affected.

CVSS 7.5 (AV:N/AC:H/PR:L/UI:N): network attack, high complexity, low privileges required (a database user able to create a database, schema, table, column or operator with a crafted name, or an end user supplying a cursor or parameter name to the application), no user interaction.

An attacker can run arbitrary SQL with the rights of the application's database role, with high impact on confidentiality, integrity and availability. Not listed in CISA KEV.

Who is affected

Organizations whose applications access PostgreSQL through the psqlODBC driver version 18.00.0006 or earlier.

What to do

  1. Inventory systems and applications using psqlODBC and check the installed version (all versions up to and including 18.00.0006 are affected).
  2. No fixed version is listed in the record – monitor the official advisory (GHSA-63r4-gjcj-f69v) and the changelog at odbc.postgresql.org and upgrade once a fix is available.
  3. Restrict CREATE privileges (databases, schemas, tables, operators) for database users who do not need them and review existing objects with unusual names (e.g. containing quotes).
  4. Do not pass end-user-supplied cursor or parameter names into ODBC calls, and consider disabling FetchRefcursors if not required.
  5. Apply least privilege to the application's database role to limit impact.

Affected products and versions

PostgreSQL psqlODBC≤ 18.00.0006

CVSS vector, explained

CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

Attack vector
Network (from the internet)
Attack complexity
High
Privileges required
Regular user
User interaction
Not required
Scope
Vulnerable component only
Confidentiality
High impact
Integrity
High impact
Availability
High impact

Weakness type (CWE)

  • CWE-89 Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
  • CWE-706 Use of Incorrectly-Resolved Name or Reference

References

Sources: CVE.org (CNA and CISA ADP), CISA KEV, FIRST EPSS. Always check the vendor's official advisory.