Read the docs

psqlODBC SQL injection and redirected writes through driver parsing differences

Priority LOW 36CWE-706Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
High
Impact type
SQL injection
Confidentiality · integrity · availability
High · High · High
Fix status
No fix listed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA. Impact type from CWE-89.

Summary

psqlODBC scans statement text itself to substitute parameters, translate ODBC escapes, join batched statements and rewrite queries for updatable cursors. Where its reading of the text differs from the server, text the driver treats as data can run as SQL, or a positioned write can go to another table. An end user who controls text the application places in a statement or parameter value can run SQL with the rights of the application's database role, and 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, and no fix is listed.

Written with Claude Haiku 5.5 from the sources below · 2026-11-26

Description from the CNA

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.

Why it matters now

EPSS 0.00501 35th percentileScored 2026-11-30
Fix No fix listed No fixed version in the sources yet

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
PostgreSQLpsqlODBCup to 18.00.0006—No fix listedCNA
  • psqlODBC VendorPostgreSQL Affected up to 18.00.0006 Fixed in — No fix listed CNA

Remediation

No fixed version is listed for psqlODBC. Until a fixed release is available, keep untrusted input out of statement text and parameter values, and do not place end user values in ConnSettings.

Written with Claude Haiku 5.5 from the sources below · 2026-11-26

Timeline

  1. 2026-11-25 Threatist record created from CVE-2026-136502

References

  • TI-2024-01491 pgjdbc SQL Injection via line comment generation CVSS 3.1CRITICAL 10.0
  • TI-2019-06651 In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows superusers and… CVSS 3.0HIGH 7.2
  • TI-2017-05187 Improper authentication in postgresql CVSS 3.0CRITICAL 9.8
  • TI-2022-06097 Unchecked Class Instantiation when providing Plugin Classes CVSS 3.1CRITICAL 9.8
  • TI-2026-96877 SQL injection in pgjdbc simple query mode parameter quoting CVSS 3.1HIGH 8.1
  • TI-2026-96876 SQL injection in pgjdbc through misparsed quoted literals CVSS 3.1HIGH 8.1
See all 256 →

Sources

This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences