All errata/sisyphus/ALT-PU-2026-23311-1
ALT-PU-2026-23311-1

Package update psqlodbc in branch sisyphus

Version18.00.0007-alt1
Published2026-11-26
Max severityHIGH
Severity:

Closed issues (17)

CVE-2026-136499
MEDIUM5.9

psqlODBC read memory it had not written, or memory past the end of an application buffer, and sent it to the server or returned it to the application: - Text bound as SQL_C_CHAR to a large-object parameter was read past the end of the application's buffer, and the extra bytes were stored in the large object. - After a fetch truncated a long bytea or large-object value, positioned updates and inserts read past the bound buffer and wrote that memory into the row. - Hex text with a NUL byte, bound to a binary parameter with an explicit length, sent uninitialised heap memory as the parameter value. - With RowVersioning=1, SQLColumns() on a table that does not exist returned uninitialised stack memory as the schema and table names. - With UseDeclareFetch=1, bookmarks of updatable block cursors contained uninitialised heap memory, and a malformed ctid from the server sent stale heap bytes in positioned updates and deletes. - With UseServerSidePrepare=0, calling SQLNumResultCols(), SQLDescribeCol() or SQLColAttribute() on a prepared statement before SQLExecute() read the application's bound parameter buffers and sent their current contents to the server as literals, although ODBC lets the application fill those buffers after the describe. - The driver named the prepared statements, savepoints, cursors and keyset plans it creates on the server after the heap addresses of its own objects, so the server, or anyone reading an unencrypted connection, learned exact heap addresses inside the client. Depending on the case, an end user who supplies a parameter value, a database user who stores a long value in a row, or a hostile server can obtain memory of the application process, which may hold data of other users or credentials. Versions up to and including psqlODBC 18.00.0006 are affected.

Published: 2026-11-25
CVSS 3.xMEDIUM 5.9
CVSS:3.x/CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
CVE-2026-136500
HIGH8.1

To escape a bound parameter, or a name passed to a catalog function, psqlODBC has to know where each multibyte character of the client encoding ends. It treated a client encoding named by an alias the server accepts, such as WIN950, Windows950 or big-5 for BIG5, as single-byte, and it accepted too narrow a range of lead bytes for JOHAB, EUC_TW, EUC_CN and EUC_KR. A quote byte that the server reads as part of such a character was then not doubled, or a quote the server reads on its own was taken for part of a character, and the literal ended early. An end user who controls one bound character parameter, or a name the application passes to a catalog function such as SQLTables(), can run SQL with the rights of the application's database role. This requires a connection that is not in UTF-8: the ANSI driver, or the ANSI entry points, with one of these client encodings. For bound parameters the driver must also be substituting parameters itself, as it does with UseServerSidePrepare=0 or a cursor type other than forward-only. Versions up to and including psqlODBC 18.00.0006 are affected.

Published: 2026-11-25
CVSS 3.xHIGH 8.1
CVSS:3.x/CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
CVE-2026-136501
HIGH7.1

To build positioned updates and to describe columns, psqlODBC matches the names in a statement against the catalog. Where it matched differently from the server, it used another table or column: - Table and schema names were compared case-insensitively in its column-information cache, so users could be taken for another user's "Users", and the driver then evaluated that table's column default to answer @@IDENTITY. - In FROM ONLY t, ONLY was taken for the table name. - Column names were compared case-insensitively, so with Parse=1 the type of another column could decide the size of the application's buffer, which a fetch then overflowed. - In a database whose encoding is single-byte, such as LATIN1 or SQL_ASCII, the server folds the accented letters of an unquoted name by its own locale, while the driver folded only A-Z, so ÉTAT could be taken for another user's "État" instead of état. - On systems other than Windows, in a Turkish or Azeri locale, an unquoted I was not folded to i, and keywords and ODBC function names did not match. - Without a schema name, SQLSpecialColumns() could report the key columns of another user's same-named temporary table, and SQLPrimaryKeys() could take another user's index named _pkey for the primary key of a table without one. - After search_path changed other than through a plain SET statement, positioned writes went to the same-named table in the previously current schema. - SQLBulkOperations() trusted the ctid stored inside a variable-length bookmark handed back by the application, and ignored the WHERE clause that restricted the cursor, so a forged bookmark read, updated or deleted any row of the cursor's table. A database user who can create a table in a schema on another user's search_path can redirect that user's positioned updates, inserts and deletes to a table of their choosing, where they run with the victim's rights, or run an expression of their choosing under the victim's role. Versions up to and including psqlODBC 18.00.0006 are affected.
Published: 2026-11-25
CVSS 3.xHIGH 7.1
CVSS:3.x/CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H
CVE-2026-136502
HIGH8.1

psqlODBC scans statement text itself to substitute parameters, translate ODBC escapes, join batched statements and rewrite queries for updatable cursors. Where it read the text differently from the server, text the driver took for data ran as SQL, or a positioned write went to another table: - An escape string constant written e'…' in lower case was not recognised as one, and '…' after a keyword ending in E, as in LIKE'…', was taken for one. - A } inside a quoted literal ended an ODBC {d …}, {t …}, {ts …} or {escape …} sequence. - Dollar-quote tags containing _ were not recognised, and an identifier starting with _ followed by $, such as _$$, was taken for the start of a dollar quote, so a parameter marker inside a literal was substituted. - A trailing -- comment in one statement of a batched parameter array swallowed the next statement. - Comments, literals longer than 255 bytes and escape strings were misread when the driver located the FROM and WHERE clauses of a query for an updatable cursor, and the text copied into the cursor's own queries could include SQL from inside a literal. - A table name containing $ was cut at the $, and a quoted table name starting with , or ; ended the table list, so positioned updates, inserts and deletes went to another table. - An integer parameter with an embedded NUL byte cut the query short. - /*/ was taken for a comment that opens and closes, while the server reads it as one that only opens. - ConnSettings was split at every semicolon, including one inside a quoted literal, so an application that puts an end user's value into a SET command there ran the rest of the value as SQL at connect time. An end user who controls text the application puts into a statement, or a parameter value, can run SQL with the rights of the application's database role. A database user who can create a table with a crafted name can redirect another user's positioned writes to a table of their choosing. Versions up to and including psqlODBC 18.00.0006 are affected.

Published: 2026-11-25
CVSS 3.xHIGH 8.1
CVSS:3.x/CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
CVE-2026-136503
HIGH7.5

psqlODBC frees memory that is still in use, frees it twice, or writes outside an application buffer in these cases: - The clean-up the driver runs at commit and rollback sends queries of its own, and the reply to one of them can start the clean-up again while it is running. The nested run frees the rollback log, or the list of cursors and prepared statements to close, and the outer run uses and frees it again. - The callback through which libpq delivers notices could run that clean-up, and close the connection, while libpq was still using the connection. - Freeing a statement whose result holds several cursors (FetchRefcursors=1, or UseDeclareFetch=1) used the freed first result while the later cursors were closed. - With UseDeclareFetch=1, after a rollback closed an updatable cursor, rows added or deleted through it were counted but not stored, so freeing the statement freed uninitialised pointers, and adding a row wrote past the keyset. - After a multi-row fetch failed on a row other than the first of its rowset, SQLGetData() wrote at an offset past the buffer the application passed. - SQLProcedureColumns() freed the result of its catalog query twice when the query failed. - In a process named sqlservr (SQL Server linked servers), a server version below 8.4 made the statement parser free a buffer twice. - A failed SQLPutData in the middle of a SQLSetPos() or SQLBulkOperations() data-at-execution sequence left the whole operation pending, with the internal statement still allocated and autocommit silently off, so later statements were rolled back at disconnect. The next positioned update ran the stale callback against a statement that was never executed and dereferenced NULL. Most of these can be triggered by a hostile or compromised server, or anyone on the network path of a connection that does not use sslmode=verify-full (the default is disable). A database user who can make a statement fail, or who controls the contents of a row the application reads, can trigger the UseDeclareFetch=1 and SQLGetData() cases against an honest server. The demonstrated results are crashes and heap corruption; code execution has not been demonstrated. Versions up to and including psqlODBC 18.00.0006 are affected.

Published: 2026-11-25
CVSS 3.xHIGH 7.5
CVSS:3.x/CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
CVE-2026-136504
MEDIUM5.0

With the driver's debug log (MyLog) turned on, two paths write the database password to the log in clear text, both beside a line where the driver's own redaction masks it as PWD=xxxxx: - Pressing "Test" in the Windows data source setup dialog (psqlsetup.dll) logs the whole connection string, which carries PWD= percent-encoded, which is reversible, and any password= or sslpassword= inside pqopt. - The Unicode connect functions SQLDriverConnectW, SQLConnectW and SQLBrowseConnectW log their arguments as they convert them between UTF-16 and UTF-8, before the masking happens. The ANSI entry points are unaffected. Turning the log on takes an administrator, and MyLog is off by default. The exposure is the person who later reads the log, which in practice means a log attached to a bug report or handed to support. Making that safe is the purpose of the driver's redaction, and these two sites bypassed it. Versions up to and including psqlODBC 18.00.0006 are affected.

Published: 2026-11-25
CVSS 3.xMEDIUM 5.0
CVSS:3.x/CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N
CVE-2026-136505
HIGH7.5

psqlODBC uses sizes and counts without checking their range, or keeps them in types too small for them: - A row array size of 0, set with SQLSetStmtAttr() or on the ARD, makes SQLSetPos() with SQL_REFRESH write past the bound arrays. - SQL_DESC_COUNT above 32767 on an APD or IPD writes before the start of a heap buffer. - A numeric parameter with a negative scale overflows a stack buffer. - SQLGetData() of a text value of 2 GiB or more into a wide-character buffer computes a wrapped size and overflows the heap. - The 16-bit reference count and size of the statement parser's column-information cache wrap, which frees a cache entry still in use or overflows the cache, and a statement with more than 32768 columns overflows the parser's field array. - An updatable cursor that records more than 65535 changes in one transaction wraps the 16-bit capacity of its rollback log, which overflows it and frees it twice. - A statement with 32769 or more parameter markers overflows a 16-bit parameter count. - A wide-character string of more than 2 GiB wraps the size of its UTF-8 conversion, which is then written below the start of a heap buffer. - SQLGetDiagField() and SQLGetDiagFieldW() always stored the five-character SQLSTATE plus its terminator and checked BufferLength only afterwards, overrunning a buffer shorter than six bytes. - The ANSI SQLSetDescField(SQL_DESC_NAME) on an IPD ignored BufferLength and copied the name with strdup(), reading a name passed as pointer plus length past its end. - SQLFetchScroll(SQL_FETCH_BOOKMARK) did not check the bookmark it was given, so whoever chooses the bookmark value read out of bounds and crashed the process. - Four places in the parameter conversion read one byte past the end of a bound character parameter, and one of them rewrote it. - Binding a date, time or timestamp C value to an SQL_INTEGER or SQL_SMALLINT parameter dereferenced NULL instead of returning the conversion error. Depending on the case, the values come from the application, from the data or statement text an end user supplies, or from a database user who controls the size of a table or value. The demonstrated results are crashes and heap corruption; code execution has not been demonstrated. Versions up to and including psqlODBC 18.00.0006 are affected.

Published: 2026-11-25
CVSS 3.xHIGH 7.5
CVSS:3.x/CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
CVE-2026-136506
HIGH7.5

psqlODBC builds queries of its own from names, and put these names into them without escaping or qualification: - the database name in SQLForeignKeys(); - the current schema name in catalog functions; - the table name in the currtid2() call that re-reads rows of updatable cursors; - column names in the inserts and updates of SQLSetPos() and SQLBulkOperations(); - cursor names set with SQLSetCursorName() or returned as refcursors (FetchRefcursors=1); - parameter names (SQL_DESC_NAME) in procedure calls; - the = operator in an OID comparison in SQLColumns(), which the server resolves through search_path. The column names of the fourth item are a variant of CVE-2026-120065 (GHSA-9cg8-r57h-h6jj). The fix for that advisory, in 18.00.0006, doubles " in the stored row-identifier name, which the keyset queries and the WHERE clause of the positioned statements use. The column names that SQLSetPos() and SQLBulkOperations() put into the SET list of their UPDATE and into the column list of their SQL_ADD INSERT come from the catalog and were not covered by it, so a driver patched to 18.00.0006 is still affected by this one. A database user who can create a database, schema, table, column or operator with a crafted name, or an end user who supplies a cursor or parameter name to the application, can run SQL with the rights of the application's database role. Versions up to and including psqlODBC 18.00.0006 are affected.

Published: 2026-11-25
CVSS 3.xHIGH 7.5
CVSS:3.x/CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
CVE-2026-136507
HIGH8.1

psqlODBC parsed and built connection strings in ways that let a value end early: - In a braced value, such as PWD={…}, a trailing byte 0x7d of a GBK, Big5 or SJIS character was taken for the closing brace. - A braced value that ended right after an escaped }} was not reported as unterminated, and its contents were parsed as further keywords. - SQLConnectW(), SQLDriverConnectW() and SQLBrowseConnectW() cut a connection string whose UTF-8 form is longer than 32767 bytes, which changes how the rest of it is parsed. - On Windows with MSDTC, the password and user name were put into the XA open string without escaping, and the XA library copied each item of that string into a 64-byte stack buffer. - Percent-encoding a long password wrote one byte past a 4096-byte stack buffer. An end user who supplies a password, or another value the application puts into the connection string, can set other connection keywords, for example to connect the application to a server of their choosing. The MSDTC case can also overflow a stack buffer in the process that loads the XA library. Versions up to and including psqlODBC 18.00.0006 are affected.

Published: 2026-11-25
CVSS 3.xHIGH 8.1
CVSS:3.x/CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
CVE-2026-136508
MEDIUM6.8

On Windows, when a connection takes part in a distributed transaction, psqlODBC and its XA library open further connections of their own to finish the transaction. These connections did not keep the security settings of the application's connection: - When the XA library's first connection attempt failed, it tried again with sslmode=allow, even for a data source configured with sslmode=verify-full or verify-ca. - The connections the driver opens itself ignored every libpq option given through pqopt, such as channel_binding=require, and the open string it registers with MSDTC carried no pqopt, so the XA library's connections dropped those options too. An attacker on the network path between the MSDTC host and the PostgreSQL server, without a certificate or credentials, can make those connections go to a server of their choosing without TLS, read and change what they send, and decide the outcome MSDTC records for the transaction. Versions up to and including psqlODBC 18.00.0006 are affected.

Published: 2026-11-25
CVSS 3.xMEDIUM 6.8
CVSS:3.x/CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N
CVE-2026-136509
HIGH7.5

psqlODBC did not check that a server reply matches the query it sent: that a FETCH returns no more rows than it asked for, that each row has the described number of columns, that one query produces one result, and that a COPY, a transaction or the connection ends where the protocol says. By sending replies that do not match, a hostile or compromised server, or anyone on the network path of a connection that does not use sslmode=verify-full (the default is disable) can corrupt memory in the application: - A FETCH reply with more rows than requested overflows the row cache. - Extra results in reply to a FETCH, or to the queries of a keyset-driven cursor, are freed while still in use. - A key query of a keyset-driven cursor answered with extra columns, or a re-read row with fewer columns, overflows the row cache. - Replies without columns or rows, or with NULL values, to the driver's internal queries at connect time and in catalog functions are dereferenced. - A malformed relacl value in SQLTablePrivileges() makes the driver write past a buffer. - On Windows with MSDTC, a long transaction name returned by the server overflows a buffer during recovery. - Values in replies to the driver's internal queries are used without checking their range: an empty column name, a parameter count, a large-object size, a function's or trigger's argument count, and a result of exactly 32767 columns. They are dereferenced, read past, returned to the application or sent back to the server as stack memory, or make the driver loop forever. - A reply that ends a COPY, the connection or the transaction at an unexpected point leaves freed results, keysets or table information in use: a CopyOutResponse followed by a lost connection, a ROLLBACK command tag under UseDeclareFetch=1, or a lost connection while a cursor with positioned updates is closed. Eight extra bytes in a reply also make the driver wait forever for a COPY to end. - On Windows, a start-up reply without client_encoding crashes the driver, and with MSDTC a failed connection makes the XA library use a connection it has already freed. - An error message ending in the first byte of a multibyte character leaves the SQLSTATE returned by SQLGetDiagRecW() unterminated. - When a string value did not fit the application's buffer, eight Unicode entry points filled the buffer and wrote no null terminator, so a caller that reads to the terminator, as ODBC allows, read past the end of its own buffer. This continues the fixes for CVE-2026-120058 and CVE-2026-120060, which covered other replies. The demonstrated results are crashes and heap corruption; code execution has not been demonstrated. Versions up to and including psqlODBC 18.00.0006 are affected.

Published: 2026-11-25
CVSS 3.xHIGH 7.5
CVSS:3.x/CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
CVE-2026-136510
MEDIUM4.8

A parameter-array execution that fails part-way leaves the rows it has already queued on the statement handle, and the next execution on that handle sends them. After a data-at-execution batch is abandoned, by SQLCancel or a rejected SQLPutData, the next SQLExecDirect sends the failed batch's rows and returns SQL_SUCCESS without sending its own statement. So an application that logs the failure on the same handle has its log entry turned into a silent no-op, while rows it was told had failed are stored. An end user who controls one value in an application's array insert can arrange both halves of that. A second route needs no data-at-execution parameter: when building a later row fails in parameter conversion, the queued rows go to the server ahead of the next parameter array on the handle, inside whatever transaction and session settings are current by then. One variant also writes past the end of a shorter SQL_ATTR_PARAM_STATUS_PTR array supplied by the next statement. The statements that run are the application's own, correctly quoted; no SQL text comes from outside. Versions from psqlODBC 12.02.0000, which introduced batched parameter-array execution, up to and including 18.00.0006 are affected.

Published: 2026-11-25
CVSS 3.xMEDIUM 4.8
CVSS:3.x/CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L
CVE-2026-136511
MEDIUM6.8

psqlODBC mapped an SSLmode value in a connection string that it did not recognise, such as SSLmode=Require, SSLmode=Verify-Full, SSLmode={require} or SSLmode={verify-full}, to disable. SQLDriverConnect() then returned SQL_SUCCESS with no diagnostic, and the connection was not encrypted. An attacker on the network path of such a connection can read and change its traffic. Versions up to and including psqlODBC 18.00.0006 are affected.

Published: 2026-11-25
CVSS 3.xMEDIUM 6.8
CVSS:3.x/CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N
CVE-2026-136512
HIGH7.5

With SQL_C_DEFAULT, the C type of a bound column or parameter follows its SQL type. An application sizes its buffer from the type it was told when it described the statement. When the column had another type at fetch time, because the server reported another type, the table was altered, or an output parameter's result column had another type, psqlODBC wrote the larger type into the smaller buffer: 12 bytes past a 4-byte buffer for a uuid, and more in multi-row fetches, where the driver also steps through the array by the larger size. Other conversions wrote past the application's buffer as well: - With Int8As set to a smaller type, an int8 column fetched as SQL_C_DEFAULT was still written as 8 bytes. - An int2vector column fetched as SQL_C_DEFAULT returned unterminated binary data instead of text. - An output parameter that the application discards by binding a NULL buffer overflowed a stack buffer in the driver. - SQLGetData() with BufferLength 0 on a column the driver reads as a large object wrote a NUL byte past the buffer. - Adding a row with SQLBulkOperations(SQL_ADD) on a static updatable cursor before the first fetch, then changing that row, rolling back and fetching it, made the keyset index arithmetic free a pointer that was never allocated and corrupt the heap. This can be triggered by a hostile or compromised server, or anyone on the network path of a connection that does not use sslmode=verify-full (the default is disable), and by the owner of a table the application reads. Versions up to and including psqlODBC 18.00.0006 are affected.

Published: 2026-11-25
CVSS 3.xHIGH 7.5
CVSS:3.x/CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
CVE-2026-136513
LOW3.6

When Debug or CommLog is enabled and the log directory cannot be used, psqlODBC falls back to a directory under the user's home directory. It wrote that path with an unexpanded ~, which is resolved relative to the process's current directory. Another local user who controls a directory on that path can make the driver create the victim's mylog_*.log and psqlodbc_*.log files in any directory the victim can write to, or leave the victim's process blocked in open(). This completes the fix for CVE-2026-120066 in 18.00.0006. Versions up to and including psqlODBC 18.00.0006 are affected.

Published: 2026-11-25
CVSS 3.xLOW 3.6
CVSS:3.x/CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N
CVE-2026-136514
MEDIUM6.5

psqlODBC assumed that a table it reads keeps the definition it had when the statement was described or parsed. A database user who owns a table or view another user's application reads can crash that application, with an honest server and default options, in these cases: - Columns dropped or added in another session while the application updates rows through an updatable cursor, or describes the columns with Parse=1. - A view whose ctid is NULL, read through an updatable cursor, which writes past the row cache, and a view with a volatile filter scrolled backward with UseDeclareFetch=1. - Rows added through an updatable cursor to a table with child tables or partitions. - A column whose type is named lo, written with data-at-execution parameters. - A DROP TABLE or ALTER TABLE on the connection while another statement still uses the table's column information. - NULL key columns in rows the driver re-reads for an updatable cursor. - A function called with more output parameters than its result has columns. - SQLTables() and SQLTablesW() dereferenced NULL when called with empty strings for the catalog, schema and table names together with a NULL TableType, which kills the process that loaded the driver and every session it serves. The demonstrated results are crashes; one case writes past a heap buffer, but code execution has not been demonstrated. Versions up to and including psqlODBC 18.00.0006 are affected.

Published: 2026-11-25
CVSS 3.xMEDIUM 6.5
CVSS:3.x/CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
CVE-2026-136515
HIGH7.5

psqlODBC rewrites statement text for keyset-driven cursors and ODBC escapes using positions it found in the text. These positions could lie outside the text or describe another statement: - After SQLExecDirect() failed on a statement handle, the FROM and WHERE positions of the failed statement were applied to the next, shorter statement on that handle. - The parser could record a FROM position with no text after it, and the rewrite then copied a negative length. - An {fn …} escape whose arguments contain FOR UPDATE, ; or INTO … FROM made the driver remove a cursor prefix from the wrong buffer. - {fn CONVERT(?, …)} with an output parameter produced a negative argument length. - An unclosed {fn …} escape made the driver read past the statement, and a few thousand nested ones exhausted the stack. - Translating @@identity in long statement text read an uninitialised pointer, and {? = call …} with nothing bound for the return value dereferenced NULL. Whoever supplies the text of a statement that an application opens on a keyset-driven or dynamic cursor with a concurrency other than read-only, or calls with an output parameter, can corrupt the application's heap and end it. That includes the users of query tools, report builders and other applications that run SQL their users type. Code execution has not been demonstrated. Versions up to and including psqlODBC 18.00.0006 are affected.

Published: 2026-11-25
CVSS 3.xHIGH 7.5
CVSS:3.x/CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H