CVE-2026-120065

psqlODBC does not escape a server-supplied column name in its updatable-cursor queries

Published Nov 2, 2026 CVSS 3.1 · 7.1 High EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

The vulnerability arises because psqlODBC fails to escape a server‑supplied column name when it constructs keyset queries for an updatable cursor. If the column name contains a quotation mark, the driver embeds it directly, altering the SQL that the application sends. This flaw can allow a database user with the ability to create a table that the application later reads with an updatable cursor to choose a column name that changes which rows a positioned UPDATE or DELETE operates on. Because the driver runs the resulting query with the application's privileges, the attacker can effectively modify the logical target of statements, leading to data integrity violations.

Affected Systems

The affected product is the PostgreSQL psqlODBC JDBC/ODBC driver. Versions released before 18.00.0006 contain the flaw. Any environment that uses the driver to issue updatable cursors against a PostgreSQL database is subject to the risk. The issue was reported to the vendor and fixed by adding escaping logic and reducing reliance on database‑supplied buffer values.

Risk and Exploitability

The CVSS score of 7.1 indicates a high risk, while official EPSS data is not available and the vulnerability is not listed in CISA's KEV catalog. The flaw can be exploited in context where an attacker can create a table whose name the application will use; this typically requires database management privileges or a compromised server that is not trusted under the current SSL configuration. Because the attack modifies the SQL at the driver level, it is difficult for end users to detect and can lead to unauthorized data modification. Administrators should consider the severity and mitigate promptly.

Remediation

Vendor Solution

Upgrade to psqlODBC 18.00.0006 or later. The driver doubles each double quote in the stored column name, and does not use a name that does not fit its buffers to identify rows.


Vendor Workaround

Set UpdatableCursors=0 in the connection string or DSN, or use read-only cursors (SQL_CONCUR_READ_ONLY).


OpenCVE Recommended Actions

  • Upgrade psqlODBC to version 18.00.0006 or later.
  • Disable updatable cursors by setting UpdatableCursors=0 in the connection string, or use read‑only cursors (SQL_CONCUR_READ_ONLY).
  • Restrict database users who can create tables used by the application, and enforce trusted SSL to prevent uncontrolled schema changes.

Generated by OpenCVE AI on November 2, 2026 at 20:36 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Postgresql
Postgresql psqlodbc
Vendors & Products Postgresql
Postgresql psqlodbc
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
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.
Title psqlODBC does not escape a server-supplied column name in its updatable-cursor queries
Weaknesses CWE-89
References
Metrics cvssV3_1

{'score': 7.1, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H'}

Weaknesses
  • CWE-89

    Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

Sources

Status
PUBLISHED
Assigner
PostgreSQL
Published
Updated
Nov 2, 2026, 7:36 PM
Reserved
Oct 30, 2026, 7:25 PM
Status
Awaiting Analysis
Published
Nov 2, 2026, 7:18 PM
Modified
Nov 2, 2026, 8:17 PM
Severity
Important
Public date
Nov 2, 2026, 7:09 PM