{"id":"CVE-2026-120063","kind":"vulnerability","aliases":["CVE-2026-120063"],"related":[],"title":"psqlODBC: long schema or table name overflows stack buffer by two bytes","description":"When psqlODBC quotes a schema or table name into a 128-byte stack buffer, its length check lets it write up to two bytes past the end of the buffer for a long name. The names come from the application's SQL text: the table of a statement the driver parses to describe its columns, and the target of the last INSERT when the driver rewrites SELECT @@IDENTITY. In the @@IDENTITY rewrite, a column name sent by the server can also write one byte past the buffer. The bytes written past the buffer are a double quote and a NUL. An application that forwards untrusted SQL text to the driver exposes its process to stack corruption. Versions before psqlODBC 18.00.0006 are affected.","summary":"psqlODBC, the PostgreSQL ODBC driver, copies a schema or table name into a 128-byte stack buffer without a correct length check, so a long name writes up to two bytes past the end. An application that forwards untrusted SQL text to the driver can have its process stack corrupted.","severity":"medium","cvss":5.9,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["odbc","package","postgresql","psqlodbc"],"not_affected_if":["driver-not-used","fixed-sql-only","version-18.00.0006-or-later"],"how_to_check":"- Check the installed driver version (for example with `odbcinst -q -d` or the driver's package manager entry) and see whether it is below `18.00.0006`.\n- Find whether the application passes user-supplied SQL text to the ODBC driver unchanged.","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:50+00:00","updated_at":"2026-11-02T19:26:50+00:00","category":"package","confidence":0.6,"triage":{"at":"2026-11-02T19:26:50Z","model":"claude-haiku-5-5","output":{"fix":"- psqlODBC: move to `18.00.0006` or later.","reach":"unknown","title":"psqlODBC: long schema or table name overflows stack buffer by two bytes","impact":"high","summary":"psqlODBC, the PostgreSQL ODBC driver, copies a schema or table name into a 128-byte stack buffer without a correct length check, so a long name writes up to two bytes past the end. An application that forwards untrusted SQL text to the driver can have its process stack corrupted.","audience":"businesses","category":"package","nicknames":[],"who_cares":["psqlodbc","postgresql","odbc"],"confidence":0.6,"fix_status":"available","needs_auth":"unknown","worst_case":"Stack corruption in the application process, possibly leading to code execution.","analyst_note":"","how_to_check":"- Check the installed driver version (for example with `odbcinst -q -d` or the driver's package manager entry) and see whether it is below `18.00.0006`.\n- Find whether the application passes user-supplied SQL text to the ODBC driver unchanged.","plain_action":"","needs_analyst":false,"not_affected_if":["fixed-sql-only","driver-not-used","version-18.00.0006-or-later"],"who_is_affected":"Applications that connect to PostgreSQL through psqlODBC versions before 18.00.0006 and forward untrusted SQL text to the driver are exposed. Applications that only run fixed SQL written by the team, or that do not use this driver, can skip it.","user_interaction":"no","needs_special_setup":"unknown","severity_if_unknown":"medium"},"cost_usd":0.000705,"input_tokens":4267,"output_tokens":557,"severity_before":"medium"},"analyst_status":null,"analyst_note":null,"search":"'-120063':15A,18A '-2026':14A,17A '128':36B,83C '18.00.0006':192C 'affect':194C 'also':153C 'applic':58B,112C,174C 'buffer':9A,39B,86C,102C,159C,165C 'byte':12A,37B,53B,84C,96C,156C,161C 'check':44B,89C 'column':127C,146C 'come':109C 'copi':28B 'correct':42B 'corrupt':72B,188C 'cve':13A,16A 'describ':125C 'doubl':168C 'driver':27B,66B,122C,137C,182C 'end':56B,99C 'expos':183C 'forward':60B,176C 'ident':140C,143C 'insert':134C 'last':133C 'length':43B,88C 'let':90C 'long':2A,47B,105C 'name':6A,33B,48B,80C,106C,108C,147C 'nul':172C 'odbc':19B,26B 'one':155C 'overflow':7A 'packag':20B 'pars':123C 'past':54B,97C,157C,163C 'postgresql':21B,25B 'process':70B,185C 'psqlodbc':1A,22B,23B,74C,191C 'quot':75C,169C 'rewrit':138C,144C 'schema':3A,30B,77C 'select':139C 'sent':148C 'server':151C 'sql':62B,114C,178C 'stack':8A,38B,71B,85C,187C 'statement':120C 'tabl':5A,32B,79C,117C 'target':130C 'text':63B,115C,179C 'two':11A,52B,95C 'untrust':61B,177C 'version':189C 'without':40B 'write':49B,92C,154C 'written':162C","nicknames":[],"mitigations":[],"who_affected":"Applications that connect to PostgreSQL through psqlODBC versions before 18.00.0006 and forward untrusted SQL text to the driver are exposed. Applications that only run fixed SQL written by the team, or that do not use this driver, can skip it.","tier":"C","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"businesses","plain_action":null,"pkeys":[],"ptokens":[],"labels":["medium","odbc","package","postgresql","psqlodbc"],"first_public_at":"2026-11-02T19:18:03+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:H","cvss_by":"f86ef6dc-4d3a-42ad-8f28-e6d5547a5007","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-120063","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-120063","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":53474,"url":"https://github.com/postgresql-interfaces/psqlodbc/security/advisories/GHSA-285r-84w3-xcxv","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"}