All reports
High

postgresql-odbc: postgresql-odbc: Memory corruption via malformed SQL escape sequences

Affected versions

Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported

Exploitation

CVE-2026-120061

Probability of exploitation in the next 30 days: 0.34%

FIRST EPSS · 2026-11-20

Description

The psqlODBC parser for ODBC escape sequences in application SQL text writes the argument offsets of a {fn} escape into a fixed 16-entry stack array without a bound and does not initialize the array. An escape with too many arguments overflows the stack, and a reference to an unsupplied argument copies arbitrary bytes into the query. The copy of a {d}, {t}, {ts}, or {escape} body also writes one byte past a 128-byte stack buffer. An application that forwards untrusted SQL text to the driver exposes its process to memory corruption. Versions before psqlODBC 18.00.0006 are affected.

A flaw was found in postgresql-odbc. When processing Open Database Connectivity (ODBC) escape sequences in SQL statements, the parser fails to properly validate buffer boundaries. An attacker capable of submitting untrusted SQL text to an application using the driver can trigger a stack-based buffer overflow. This vulnerability can lead to memory corruption, potentially resulting in an application crash or arbitrary code execution.