Skip to main content
← Vulnerabilities

psqlODBC stack buffer overflow copying ctid and oid values for updatable cursors

Written by anthropic/claude-haiku-5.5 from the sources below. Verify against them.

5.9MediumCNA
Exploited
No known exploitation
Fix
Fixed in 18.00.0006
Who is exposed
Not reported

Do first: Upgrade to a fixed version: 18.00.0006.

Published
Last modified
Published
Not listed in CISA KEV
43/100 · provisional
Fix
Fixed in 18.00.0006
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: none
  • Automatable: no
  • Technical impact: partial

Summary

psqlODBC, the PostgreSQL ODBC driver used by applications to connect to PostgreSQL databases, is affected when it handles updatable cursors. A malicious or untrusted database server, or a database user who can create a crafted view, can trigger a stack buffer overflow that may crash the application or overwrite adjacent memory, potentially allowing code execution.

Read the original description

For updatable cursors, which are enabled by default, psqlODBC adds hidden ctid and, for tables with OIDs, oid columns to the query. It copies each value into a 32-byte stack buffer using the length the server sent, without checking it against the buffer size, so a value of 32 bytes or more writes past the buffer. A server not trusted under current SSL settings can send such a value. So can any database user who can create a view with its own column named ctid that the application reads with an updatable cursor. Builds with _FORTIFY_SOURCE abort; other builds overwrite adjacent stack memory. Versions before psqlODBC 18.00.0006 are affected.

What to do

  • Upgrade to a fixed version: 18.00.0006.

Timeline

  1. CVE published
  2. First seen by cve.now
  3. CISA SSVC assessment

    Exploitation: none · Automatable: no · Technical impact: partial

  4. Record last updated

Affected versions

  • PostgreSQL psqlODBC

    fixed in 18.00.0006

Evidence 1

  1. Advisory

Corrections

None so far.

Something wrong on this page? Report an error. Every fix is listed here.