CVE-2026-120061

Description

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.

Statement

This vulnerability is rated as Important because successful exploitation can allow an authenticated attacker to compromise memory integrity, potentially leading to arbitrary code execution within the context of the client process. The flaw specifically impacts environments where applications forward user-supplied, untrusted SQL queries through the postgresql-odbc driver. In typical architectures, database drivers process queries formulated internally by trusted application logic, limiting the exposure to scenarios where dynamic or raw queries from untrusted sources are accepted.

Mitigation

--- CME Mitigation Guidance (2026-11-04) ---
Disclaimer: The following mitigation solutions are provided as a courtesy, pending the application of an official patch. This content was generated utilizing AI tools in conjunction with data from https://cmetaxonomy.org. Customers are advised to independently evaluate and test these temporary mitigations within their own infrastructure.

The highest-value action is to prevent untrusted SQL text containing ODBC escape sequences from reaching the psqlODBC driver parser: upgrade to psqlODBC 18.00.0006 (or the fixed Postgresql Odbc builds), which enforce bounds checking on escape argument arrays and buffer copies when parsing ODBC escape sequences, closing all 3 injection vectors ({fn} escape sequence with excessive argument count, {fn} escape sequence referencing unsupplied arguments, crafted {d}, {t}, {ts}, or {escape} sequence body triggering an off-by-one buffer write). Until patched, this is a concern on applications passing untrusted SQL text to the postgresql-odbc driver, so reject or filter SQL text containing ODBC escape sequences before forwarding untrusted queries to the driver, ensuring queries are formulated internally by trusted application logic. As a compensating measure, enable Address Space Layout Randomization to randomize application memory space and impede reliable exploitation and ROP chain construction and enforce Control Flow Integrity or Shadow Call Stack to protect return addresses and prevent execution hijacking if saved frame pointers or return addresses are corrupted. These controls limit blast radius and contain exploitation, but they do not fix the underlying stack buffer overflow and off-by-one parsing defect — apply the upstream patch to fully remediate.

Highest-impact CME: CME-103 Stack Canaries (Stack Protector) (high)

Common Vulnerability Scoring System (CVSS) Score Details

Info alert:Important note

CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).

The following CVSS metrics and score provided are preliminary and subject to review.

CVSS v3 Score Breakdown

Red HatNVDcve.org
Base Score7.5N/A7.5
Attack VectorNetworkN/ANetwork
Attack ComplexityHighN/AHigh
Privileges RequiredLowN/ALow
User InteractionNoneN/ANone
ScopeUnchangedN/AUnchanged
ConfidentialityHighN/AHigh
Integrity ImpactHighN/AHigh
Availability ImpactHighN/AHigh

Vector

Red Hat: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

cve.org: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

Understanding the Weakness (CWE)

Integrity

Technical Impact: Modify Memory; Execute Unauthorized Code or Commands

Write operations could cause memory corruption. In some cases, an adversary can modify control data such as return addresses in order to execute unexpected code.

Availability

Technical Impact: DoS: Crash, Exit, or Restart

Attempting to access out-of-range, invalid, or unauthorized memory could cause the product to crash.

Other

Technical Impact: Unexpected State

Subsequent write operations can produce undefined or unexpected results.

Frequently Asked Questions

Want to get errata notifications? Sign up here.