{"id":"CVE-2026-120065","kind":"vulnerability","aliases":["CVE-2026-120065"],"related":[],"title":"psqlODBC: unescaped column names let table creators inject SQL","description":"For an updatable cursor over a table without OIDs that has an auto-increment int4 column, psqlODBC uses that column to identify rows. It places the column's name, as reported by the server, between double quotes in its keyset queries and in the WHERE clause of its positioned SELECT, UPDATE, and DELETE statements, without doubling any double quote in the name. A column name that contains a double quote therefore changes the SQL that the driver runs with the application's privileges, including which rows a positioned UPDATE or DELETE affects. Any database user who can create a table that the application reads with an updatable cursor can choose such a name, and so can a server not trusted under current SSL settings. Versions before psqlODBC 18.00.0006 are affected.","summary":"psqlODBC, the PostgreSQL ODBC driver, builds queries by wrapping an auto-increment column name in double quotes without escaping embedded double quotes. A database user who can create a table with a crafted column name can change the SQL the driver runs under the application's privileges, including which rows an UPDATE or DELETE touches.","severity":"high","cvss":7.1,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["microsoft-access","odbc","package","php","postgresql","psqlodbc","python"],"not_affected_if":["no-updatable-cursors","trusted-table-creators-only"],"how_to_check":"- Check the installed psqlODBC driver version against the fixed release.\n- Look for applications that use updatable cursors (SQLSetCursorName or keyset cursors) on tables without OIDs.\n- Check whether untrusted users can create tables in databases the application reads.","fix":"- psqlODBC: move to `18.00.0006` or later.","status":"open","published_at":"2026-11-02T19:18:03+00:00","first_seen_at":"2026-11-02T19:24:40+00:00","triaged_at":"2026-11-02T19:26:44+00:00","updated_at":"2026-11-02T19:26:44+00:00","category":"package","confidence":0.6,"triage":{"at":"2026-11-02T19:26:44Z","model":"claude-haiku-5-5","output":{"fix":"- psqlODBC: move to `18.00.0006` or later.","reach":"network","title":"psqlODBC: unescaped column names let table creators inject SQL","impact":"high","summary":"psqlODBC, the PostgreSQL ODBC driver, builds queries by wrapping an auto-increment column name in double quotes without escaping embedded double quotes. A database user who can create a table with a crafted column name can change the SQL the driver runs under the application's privileges, including which rows an UPDATE or DELETE touches.","audience":"developers","category":"package","nicknames":[],"who_cares":["psqlodbc","postgresql","odbc","python","php","microsoft-access"],"confidence":0.6,"fix_status":"available","needs_auth":"yes","worst_case":"Attacker alters SQL run by the driver, affecting which rows change","analyst_note":"Confirm the exact affected version range and the fixed release notes at the NVD and vendor advisory links.","how_to_check":"- Check the installed psqlODBC driver version against the fixed release.\n- Look for applications that use updatable cursors (SQLSetCursorName or keyset cursors) on tables without OIDs.\n- Check whether untrusted users can create tables in databases the application reads.","plain_action":"","needs_analyst":true,"not_affected_if":["no-updatable-cursors","trusted-table-creators-only"],"who_is_affected":"Applications using psqlODBC with updatable cursors over tables that have an auto-increment int4 column and no OIDs. Exposure is greater where database users can create tables the application reads, or where the driver connects to a server not trusted under current SSL settings. Systems that do not use updatable cursors or do not run untrusted table creation can deprioritize this.","user_interaction":"no","needs_special_setup":"yes","severity_if_unknown":"unknown"},"cost_usd":0.000745,"input_tokens":4280,"output_tokens":634,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-120065':12A,15A '-2026':11A,14A '18.00.0006':209C 'access':18B 'affect':173C,211C 'applic':70B,162C,184C 'auto':36B,94C 'auto-incr':35B,93C 'build':30B 'chang':62B,153C 'choos':191C 'claus':127C 'column':3A,38B,59B,97C,101C,108C,145C 'contain':148C 'craft':58B 'creat':53B,179C 'creator':7A 'current':203C 'cursor':84C,189C 'cve':10A,13A 'databas':49B,175C 'delet':79B,134C,172C 'doubl':41B,46B,117C,137C,139C,150C 'driver':29B,66B,158C 'embed':45B 'escap':44B 'identifi':103C 'includ':73B,165C 'increment':37B,95C 'inject':8A 'int4':96C 'keyset':121C 'let':5A 'microsoft':17B 'microsoft-access':16B 'name':4A,39B,60B,110C,143C,146C,194C 'odbc':19B,28B 'oid':89C 'packag':20B 'php':21B 'place':106C 'posit':130C,169C 'postgresql':22B,27B 'privileg':72B,164C 'psqlodbc':1A,23B,25B,98C,208C 'python':24B 'queri':31B,122C 'quot':42B,47B,118C,140C,151C 'read':185C 'report':112C 'row':75B,104C,167C 'run':67B,159C 'select':131C 'server':115C,199C 'set':205C 'sql':9A,64B,155C 'ssl':204C 'statement':135C 'tabl':6A,55B,87C,181C 'therefor':152C 'touch':80B 'trust':201C 'unescap':2A 'updat':77B,83C,132C,170C,188C 'use':99C 'user':50B,176C 'version':206C 'without':43B,88C,136C 'wrap':33B","nicknames":[],"mitigations":[],"who_affected":"Applications using psqlODBC with updatable cursors over tables that have an auto-increment int4 column and no OIDs. Exposure is greater where database users can create tables the application reads, or where the driver connects to a server not trusted under current SSL settings. Systems that do not use updatable cursors or do not run untrusted table creation can deprioritize this.","tier":"B","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"developers","plain_action":null,"pkeys":[],"ptokens":[],"labels":["high","microsoftaccess","odbc","package","php","postgresql","psqlodbc","python"],"first_public_at":"2026-11-02T19:18:03+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H","cvss_by":"f86ef6dc-4d3a-42ad-8f28-e6d5547a5007","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-120065","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-120065","severity":null,"published_at":"2026-11-02T19:18:03+00:00","modified_at":"2026-11-02T19:18:03+00:00","first_seen_at":"2026-11-02T19:24:40+00:00","fetched_at":"2026-11-02T19:24:40+00:00","note":null}],"documents":[{"id":53476,"url":"https://github.com/postgresql-interfaces/psqlodbc/security/advisories/GHSA-9cg8-r57h-h6jj","title":"Vendor advisory: github.com","kind":"vendor","source":"nvd","publisher":"vendor","text":null,"published_at":null,"relation":"advisory","confidence":null,"note":"Vendor advisory: github.com"}],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}