# CVE-2026-120061: psqlODBC stack overflow in ODBC escape sequence parser

Source: https://junglewise.ai/threats/cve-2026-120061-the-psqlodbc-parser-for-odbc-escape-sequences-in-application-sql  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-11-02. Updated: 2026-11-02  
License: CC BY 4.0 with a link back

CVE-2026-120061 · Severity: high · CVSS 7.5 · Published 2026-11-02

psqlODBC is a driver that allows applications to connect to PostgreSQL databases using the ODBC interface. The driver's parser for SQL escape sequences does not properly validate input, allowing an application that processes untrusted SQL to trigger memory corruption in its own process. An attacker who can influence the SQL text forwarded to the driver could crash the application or potentially execute arbitrary code.

Technologies: [PostgreSQL psqlODBC](https://junglewise.ai/threats/technologies/postgresql-psqlodbc). Vendors: [PostgreSQL](https://junglewise.ai/threats/vendors/postgresql).

## Quick answers

**Is CVE-2026-120061 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-120061 being exploited in the wild.

**How severe is CVE-2026-120061?** High severity, with a CVSS score of 7.5, published 2 November 2026.

**Which products and versions are affected?** PostgreSQL psqlODBC before 18.00.0006.

**Is there a fix for CVE-2026-120061?** Yes: fixed in psqlODBC 18.00.0006 and later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-120061 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-120061?** Check whether you run PostgreSQL psqlODBC at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- Fixed in psqlODBC 18.00.0006 and later

## Technical details

The ODBC escape sequence parser writes argument offsets into a fixed 16-entry stack array without bounds checking, and reads from an unsupplied argument position can copy arbitrary memory bytes into the query. Additionally, the parser writes one byte past a 128-byte stack buffer when processing {d}, {t}, {ts}, or {escape} escape bodies. An attacker submitting SQL with excessive escape arguments or specially crafted escape syntax triggers stack buffer overflow and out-of-bounds writes.

## Affected products

- PostgreSQL psqlODBC before 18.00.0006

## Timeline

- 2026-11-02: disclosed

## References

- [https://github.com/postgresql-interfaces/psqlodbc/security/advisories/GHSA-hfm6-qfx8-v4xq](https://github.com/postgresql-interfaces/psqlodbc/security/advisories/GHSA-hfm6-qfx8-v4xq)

## Related threats

- [psqlODBC stack buffer overflow in updatable cursor handling](https://junglewise.ai/threats/cve-2026-120067-for-updatable-cursors-which-are-enabled-by-default-psqlodbc-adds)
- [psqlODBC insecure log file handling on Unix systems](https://junglewise.ai/threats/cve-2026-120066-on-unix-like-systems-when-logging-is-enabled-psqlodbc-creates)
- [psqlODBC SQL injection in row identification for updatable cursors](https://junglewise.ai/threats/cve-2026-120065-for-an-updatable-cursor-over-a-table-without-oids-that-has-an)
- [PostgreSQL psqlODBC array index validation buffer overflow](https://junglewise.ai/threats/cve-2026-120064-several-psqlodbc-entry-points-use-an-application-supplied-column)
- [psqlODBC stack buffer overflow in schema/table name quoting](https://junglewise.ai/threats/cve-2026-120063-when-psqlodbc-quotes-a-schema-or-table-name-into-a-128-byte)
