PT-2026-159564
CVE-2026-136502
·
Published
2026-11-25
·
Updated
2026-11-25
Description by
CVSS 3.1
8.1
HighMetricsAV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Name of the Vulnerable Software and Affected Versions
psqlODBC versions prior to 18.00.0007
Description
The driver scans statement text to substitute parameters, translate ODBC escapes, join batched statements, and rewrite queries for updatable cursors. Discrepancies between how the driver and the server interpret text can lead to data being executed as SQL or positioned writes being directed to incorrect tables. Specific issues include:
- Lowercase escape string constants
e'...'not being recognized, or strings following keywords ending in E (e.g.,LIKE'...') being incorrectly treated as escape strings. - A
}within a quoted literal prematurely ending ODBC{d ...},{t ...},{ts ...}, or{escape ...}sequences. - Dollar-quote tags containing
not being recognized, and identifiers starting withfollowed by$(e.g.,$$) being mistaken for dollar-quote starts, causing parameter substitution inside literals. - Trailing
--comments in batched parameter arrays consuming subsequent statements. - Misreading of comments, escape strings, and literals exceeding 255 bytes when locating
FROMandWHEREclauses for updatable cursors, potentially including literal text in the cursor's queries. - Table names containing
$being truncated, or quoted table names starting with,or;ending the table list, redirecting positioned updates, inserts, and deletes. - Integer parameters containing an embedded NUL byte truncating the query.
- The sequence
/*/being interpreted as a self-closing comment by the driver but as an opening comment by the server. ConnSettingsbeing split at every semicolon, including those in quoted literals, allowing SQL execution at connection time if user input is placed in aSETcommand.
An attacker controlling statement text or parameter values can execute SQL with the application's database role privileges. Additionally, a user capable of creating tables with crafted names can redirect positioned writes to a different table.
Recommendations
Update psqlODBC to a version newer than 18.00.0006.
Found an issue in the description? Have something to add? Feel free to write us 👾