CVE-2026-136510: Statement after an abandoned parameter array sends the abandoned batch's rows instead of its own
A parameter-array execution that fails part-way leaves the rows it has already queued on the statement handle, and the next execution on that handle sends them. After a data-at-execution batch is abandoned, by SQLCancel or a rejected SQLPutData, the next SQLExecDirect sends the failed batch's rows and returns SQLSUCCESS without sending its own statement.
So an application that logs the failure on the same handle has its log entry turned into a silent no-op, while rows it was told had failed are stored. An end user who controls one value in an application's array insert can arrange both halves of that.
A second route needs no data-at-execution parameter: when building a later row fails in parameter conversion, the queued rows go to the server ahead of the next parameter array on the handle, inside whatever transaction and session settings are current by then. One variant also writes past the end of a shorter SQLATTRPARAMSTATUSPTR array supplied by the next statement.
The statements that run are the application's own, correctly quoted; no SQL text comes from outside.
Versions from psqlODBC 12.02.0000, which introduced batched parameter-array execution, up to and including 18.00.0006 are affected.
Affected Software
Event History
Frequently Asked Questions
Which applications are exposed to this issue?
Applications using psqlODBC parameter-array execution on a reused statement handle are affected when an earlier array execution fails or is abandoned after rows have been queued. The affected range starts at psqlODBC 12.02.0000 and includes 18.00.
What must happen for an attacker to exploit it?
An end user must be able to control a value in an application's array insert and cause a data-at-execution batch to be abandoned, such as through SQLCancel or a rejected SQLPutData. The later SQLExecDirect on the same handle then sends queued rows from the failed batch instead of its intended statement.
Can this occur without a data-at-execution parameter?
Yes. If parameter conversion fails while building a later row, rows already queued can be sent to the server before the next parameter array on that handle, under the transaction and session settings active at that time.
What are the potential effects beyond unintended row insertion?
A subsequent logging statement on the same handle can silently become a no-op while rows reported as failed are stored. One variant can also write beyond a shorter SQL_ATTR_PARAM_STATUS_PTR array supplied by the next statement.
How can teams reduce risk before updating?
Avoid reusing a statement handle after a parameter-array execution fails, is cancelled, or has SQLPutData rejected. Use a new statement handle for subsequent work, particularly for logging or other statements that must execute reliably.