---
id: "CVE-2026-120065"
kind: "vulnerability"
aliases: ["CVE-2026-120065"]
title: "psqlODBC: unescaped column names let table creators inject SQL"
severity: "high"
cvss: 7.1
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["microsoft-access", "odbc", "package", "php", "postgresql", "psqlodbc", "python"]
not_affected_if: ["no-updatable-cursors", "trusted-table-creators-only"]
published_at: "2026-11-02T19:18:03+00:00"
first_seen_at: "2026-11-02T19:24:40+00:00"
updated_at: "2026-11-02T19:26:44+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-120065", "first_seen_at": "2026-11-02T19:24:40+00:00"}]
---

# psqlODBC: unescaped column names let table creators inject SQL

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.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed psqlODBC driver version against the fixed release.
- Look for applications that use updatable cursors (SQLSetCursorName or keyset cursors) on tables without OIDs.
- Check whether untrusted users can create tables in databases the application reads.

## Fix

- psqlODBC: move to `18.00.0006` or later.

## Timeline

- 2026-11-02T19:24:40+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-120065

## Documents

- [advisory] Vendor advisory: github.com https://github.com/postgresql-interfaces/psqlodbc/security/advisories/GHSA-9cg8-r57h-h6jj

## From the sources

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.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
