CVE-2026-136502

SQL injection and redirected writes because the driver reads SQL text differently from the server

8.1 high EPSS 0.50%

Published 25 Nov 2026 Updated 25 Nov 2026 CNA: PostgreSQL

Check your servers for CVE-2026-136502

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-136502 affects psqlodbc, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

Description

psqlODBC scans statement text itself to substitute parameters, translate ODBC escapes, join batched statements and rewrite queries for updatable cursors. Where it read the text differently from the server, text the driver took for data ran as SQL, or a positioned write went to another table:

- An escape string constant written e'…' in lower case was not recognised as one, and '…' after a keyword ending in E, as in LIKE'…', was taken for one. - A } inside a quoted literal ended an ODBC {d …}, {t …}, {ts …} or {escape …} sequence. - Dollar-quote tags containing _ were not recognised, and an identifier starting with _ followed by $, such as _$$, was taken for the start of a dollar quote, so a parameter marker inside a literal was substituted. - A trailing -- comment in one statement of a batched parameter array swallowed the next statement. - Comments, literals longer than 255 bytes and escape strings were misread when the driver located the FROM and WHERE clauses of a query for an updatable cursor, and the text copied into the cursor's own queries could include SQL from inside a literal. - A table name containing $ was cut at the $, and a quoted table name starting with , or ; ended the table list, so positioned updates, inserts and deletes went to another table. - An integer parameter with an embedded NUL byte cut the query short. - /*/ was taken for a comment that opens and closes, while the server reads it as one that only opens. - ConnSettings was split at every semicolon, including one inside a quoted literal, so an application that puts an end user's value into a SET command there ran the rest of the value as SQL at connect time.

An end user who controls text the application puts into a statement, or a parameter value, can run SQL with the rights of the application's database role. A database user who can create a table with a crafted name can redirect another user's positioned writes to a table of their choosing.

Versions up to and including psqlODBC 18.00.0006 are affected.

Severity (CVSS)

8.1 high CVSS 3.1 from PostgreSQL (CNA)
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Attack vector
network: an attacker can reach the vulnerable part over the network, often from the internet
Attack complexity
high: an attack depends on conditions outside the control of the attacker, such as a race
Privileges required
none: the attacker does not need an account
User interaction
none: nobody has to click or open anything
Scope
unchanged: the damage stays inside the vulnerable component
Impact
confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)

Exploitation

EPSS 0.50%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 44.5% of all scored CVEs. Scores of 1 Dec 2026.

Weakness

  • CWE-89 Improper Neutralization of Special Elements used in an SQL Command
  • CWE-706 Use of Incorrectly-Resolved Name or Reference

Affected products

As the CNA lists them.

ProductVersions
psqlODBC
package psqlodbc
affected up to and including 18.00.0006
Other versions: unaffected

Is my server affected?

Find the installed version of psqlodbc and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.

Debian, Ubuntu

dpkg -l | grep -i psqlodbc
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2026-136502 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2026-136502

RHEL, Rocky, Alma, Fedora

rpm -q psqlodbc
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2026-136502

Alpine

apk list --installed | grep -i psqlodbc

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2026-136502
trivy image --scanners vuln IMAGE | grep CVE-2026-136502

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Advisories

Patches and release notes

Source: the record CVE-2026-136502 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.