Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit crafted input through application input path
-
DeliveryDriver mis-parses statement, parameter, or ConnSettings text
-
ExploitAttacker-controlled text is treated as SQL
-
ExecutionExecute SQL as application's database role
-
ImpactRead, modify, or redirect data
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Persistence The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires an application using psqlODBC ≤18.00.0006 that incorporates attacker-influenced text into statement text, parameter values, or the ConnSettings connection option. Concrete triggers named in the advisory include: a lowercase e'…' escape constant or '…' after a keyword ending in E (e.g. LIKE'…'); a } inside a quoted literal prematurely ending an ODBC {d/t/ts/escape …} sequence; dollar-quote mishandling of tags with _ and identifiers like _$$ causing parameter markers inside literals to be substituted; a trailing -- comment in a batched parameter array swallowing the next statement; misread comments/literals/escape strings in updatable-cursor FROM/WHERE parsing; a table name containing $ or a quoted name beginning with , or ; redirecting positioned writes; an integer parameter with an embedded NUL byte truncating the query; /*/ treated as an open-and-close comment; and ConnSettings split at a semicolon inside a quoted literal, so an end-user value placed into a SET command runs the remainder as SQL at connect time. LIMITING FACTORS: the application must actually route untrusted input into one of these paths; the table-redirection variant additionally requires a database user able to CREATE a table with a crafted name. PR:N means no database credentials are needed by the injecting user, but exploitation is not possible against an application that never feeds attacker-controlled text to the driver. |
| Impact | This is a genuine, non-trivial priority rather than a paper-high score. The CVSS 3.1 vector (AV:N/AC:H/PR:N/UI:N, C:H/I:H/A:H, base 8.1) combined with CWE-89 means an attacker who merely controls text the application feeds into a statement, or a parameter value, can execute SQL with the full rights of the application's database role, and the write-redirection variant lets a user who can create a crafted table name steer another user's positioned UPDATE/INSERT/DELETE elsewhere. AC:H is appropriate because successful exploitation depends on the application actually placing attacker-influenced text into statements, parameters, or ConnSettings - not on attacker-controlled race timing. PR:N correctly reflects that the injecting end user needs no database credentials of their own; they reach the flaw through an application input path. No EPSS score, no CISA KEV entry, and no public exploit are present in the supplied data, so there is no evidence of active exploitation - the signals indicate serious latent risk, not confirmed in-the-wild use. The vuln.today priority is this_week, consistent with a high-impact driver flaw that is not an emergency. Note one tension: PR:N (unauthenticated at the CVSS layer) coexists with real-world prerequisites that the application must route untrusted data into the driver - verify against your own deployment before assuming trivially remote exploitation. |
| Exploit ScenarioDerived | An application uses psqlODBC (≤18.00.0006) and places end-user-supplied text into a statement, a parameter, or a ConnSettings SET command. The user submits a value crafted to exploit one of the parser discrepancies - for example a semicolon inside a quoted literal passed to ConnSettings, a lowercase e'…' escape string, or a parameter marker hidden inside a literal via _$$ - so the driver treats attacker data as SQL and executes it with the application's database role. No public exploit identified at time of analysis; the GitHub Security Advisory documents the mechanisms. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 25, 2026
SQL injection in psqlODBC up to and including 18.00.0006 lets remote unauthenticated attackers run SQL with the application's database role whenever an application routes attacker-influenced text into statement text, parameter values, or the ConnSettings connection option. The root cause is the driver's client-side SQL scanner disagreeing with the PostgreSQL server's lexer across lowercase e'...' escape constants, dollar-quote tags containing '_', '}' inside quoted literals within ODBC {d/t/ts/escape ...} sequences, trailing '--' comments in batched parameter arrays, updatable-cursor FROM/WHERE lookup, '/*/' comment handling, embedded NUL bytes in integer parameters, and semicolon-split ConnSettings, so text the driver treats as data reaches the server as code. A second variant lets a database user who can create a table with a crafted name (containing '$', or a quoted name beginning with ',' or ';') redirect another user's positioned updates, inserts and deletes; no public exploit identified at time of analysis, and the assessed AC:H reflects that exploitation depends on the application actually feeding untrusted input into these driver paths.
RemediationAI
Upgrade psqlODBC past 18.00.0006 to the release that carries the parser fixes; the exact patched version is not stated in the supplied data, so confirm it against the vendor advisory at https://github.com/postgresql-interfaces/psqlodbc/security/advisories/GHSA-4392-6j85-5q2q and the changelog at https://odbc.postgresql.org/changelog/ before rollout, and stage the upgrade against representative updatable-cursor, batch and escape-sequence workloads since the fixes alter client-side SQL rewriting. Where the driver cannot be updated immediately, stop interpolating application or end-user supplied values into SQL text and use server-side parameter binding instead, and never embed user-supplied values into SET commands within ConnSettings, because that path is split at semicolons inside quoted literals at connect time. To blunt the positioned-write redirection variant, revoke CREATE on application schemas from untrusted roles and validate table names used in updatable cursors, accepting that this does not stop the injection variants. These are partial mitigations only; replacing the vulnerable driver remains the complete fix.
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
psqlODBC is the official PostgreSQL ODBC driver and, unlike a thin protocol shim, it parses SQL text on the client side to substitute parameter markers, translate ODBC escape sequences such as {d ...}, {t ...}, {ts ...} and {escape ...}, join batched statement arrays, and rewrite queries so that updatable cursors can emit positioned UPDATE/DELETE statements. That re-implementation of the server's lexer is the weak point: wherever the driver's tokenizer and the server's tokenizer disagree about what is a literal, a comment or an identifier, the driver's rewriting produces a statement the server interprets differently. CWE-89 (Improper Neutralization of Special Elements used in an SQL Command) is the applicable class, and the affected CPE cpe:2.3:a:postgresql:psqlodbc:*:*:*:*:*:*:*:* covers every release through 18.00.0006. The assessed vector CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H reflects high confidentiality and integrity impact with no database credentials required of the injecting party, tempered by the precondition that the application must place attacker-controlled text into a statement, a bound parameter, or the connection-string ConnSettings SET command.
Know when Psqlodbc gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
AV:N and PR:N because an unauthenticated end user injects via an application input path; AC:H because success depends on the app passing untrusted text into statements; full C/I/A impact from SQL execution as the app's DB role.
Primary rating from Vendor (PostgreSQL).
CVSS VectorVendor: PostgreSQL
DescriptionCVE.org
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.
Articles & Coverage 2
Technical POC Analysis
CWE-89 (SQL injection), with CWE-706 (incorrectly-resolved name/reference) for the redirect-to-another-table variant.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
CVE-2026-136502 is a high-severity SQL injection vulnerability in psqlODBC versions up to 18.00.0006 that allows attackers to execute unauthorized SQL under the application's database role. This threatens any organization using psqlODBC to connect applications to PostgreSQL, potentially leading to data breaches or corruption, and requires immediate mitigation since no patch is available.
No vendor patch identified at time of analysis. Interim mitigations include: ensuring all SQL queries use parameterized statements and avoiding dynamic SQL construction from untrusted input; validating and sanitizing all input reaching database queries; restricting database user privileges to least privilege; monitoring database logs for anomalous queries; deploying a web application firewall (WAF) with SQL injection rules; and isolating vulnerable applications from untrusted networks.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.
Affected Products (CPE)CVE.org
psqlODBC through 18.00.0006 parses and rebuilds connection strings in several ways that let an attacker-influenced value
SQL injection in psqlODBC through 18.00.0006 lets an attacker who controls a bound character parameter or a name passed
Heap corruption in psqlODBC through 18.00.0006 can crash an application or corrupt its memory when it processes attacker
Extreme sizes and counts handled without range checks in psqlODBC's driver core let 16-bit counters and 2 GiB-scale size
Heap corruption and driver crashes in psqlODBC (all versions up to and including 18.00.0006) stem from the driver not ve
SQL injection in psqlODBC through crafted database, schema, table, column, operator, cursor, or parameter identifiers ca
A client-side memory-corruption flaw in the PostgreSQL ODBC driver (psqlODBC) through 18.00.0006 causes the driver to wr
Memory-safety defects across several code paths in psqlODBC, the PostgreSQL ODBC driver, allow a hostile or compromised
Out-of-bounds reads and writes in psqlODBC before 18.00.0006 arise when a host application forwards untrusted column num
SQL injection in psqlODBC before 18.00.0006 allows an attacker who can influence a table or schema name passed by a host
A stack-based buffer overflow (CWE-121) in the psqlODBC driver, the official PostgreSQL ODBC driver, lets attacker-influ
Heap out-of-bounds write in the psqlODBC driver (CWE-787) affects all versions before 18.00.0006 and is reachable only w
NVD
CVE.org
EPSS
GitHub
Exploit-DB