CVE-2026-120061
Awaiting Analysis Awaiting Analysis - Queue

psqlODBC Stack Buffer Overflow in SQL Parsing

Vulnerability report for CVE-2026-120061, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-11-02

Last updated on: 2026-11-02

Assigner: PostgreSQL

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-11-02
Last Modified
2026-11-02
Generated
2026-11-02
AI Q&A
2026-11-02
EPSS Evaluated
N/A
NVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
PostgreSQL psqlODBC 0

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-193 A product calculates or uses an incorrect maximum or minimum value that is 1 more, or 1 less, than the correct value.
CWE-457 The code uses a variable that has not been initialized, leading to unpredictable or unintended results.
CWE-121 A stack-based buffer overflow condition is a condition where the buffer being overwritten is allocated on the stack (i.e., is a local variable or, rarely, a parameter to a function).

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability involves the psqlODBC driver's handling of ODBC escape sequences in SQL text. The parser writes argument offsets into a fixed 16-entry stack array without bounds checking, allowing overflow if too many arguments are provided. It also fails to initialize the array and copies arbitrary bytes into queries when referencing unsupplied arguments. Additionally, it writes one byte past a 128-byte stack buffer when processing certain escape sequences. This can lead to memory corruption in applications that forward untrusted SQL text to the driver.

Detection Guidance

This vulnerability is specific to the psqlODBC driver and requires checking the version of the driver in use. No direct network or system detection commands are provided in the context. Ensure psqlODBC is updated to version 18.00.0006 or later to avoid exposure.

Impact Analysis

If you use an affected version of psqlODBC (before 18.00.0006) and your application forwards untrusted SQL text to the driver, an attacker could exploit this to corrupt memory in your application's process. This may result in crashes, data corruption, or arbitrary code execution, potentially allowing the attacker to take control of your system or access sensitive data.

Mitigation Strategies

Immediately update the psqlODBC driver to version 18.00.0006 or later to patch the stack overflow and memory corruption issues. If updating is not possible, restrict applications from forwarding untrusted SQL text to the driver.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-120061. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart

Security Radar

News mentioning this vulnerability
Loading related security news...