BIT-postgresql-2026-116312: PostgreSQL MERGE can place the wrong row in a trigger transition table
Inconsistent transition-capture state in PostgreSQL MERGE allows a table data modifier to make an AFTER trigger process the wrong new row, via a partitioned table MERGE that performs an INSERT before an UPDATE. Within major versions 15-18, minor versions before PostgreSQL 18.7, 17.12, 16.16, and 15.20 are affected. Versions before PostgreSQL 15 are unaffected.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
bitnami/postgresqlto a version that resolves this vulnerability.Fixed in 15.20.0 - Upgrade
Upgrade
bitnami/postgresqlto a version that resolves this vulnerability.Fixed in 16.16.0 - Upgrade
Upgrade
bitnami/postgresqlto a version that resolves this vulnerability.Fixed in 17.12.0 - Upgrade
Upgrade
bitnami/postgresqlto a version that resolves this vulnerability.Fixed in 18.7.0 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 18.7 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 17.12 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 16.16 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 15.20
Event History
Frequently Asked Questions
Which PostgreSQL deployments are affected?
PostgreSQL major versions 15 through 18 are affected if they are below 15.20, 16.16, 17.12, or 18.7, respectively. Versions before PostgreSQL 15 are unaffected.
What conditions are required to trigger the issue?
An attacker needs privileges to run a table data modification involving MERGE on a partitioned table. The MERGE must perform an INSERT before an UPDATE, causing an AFTER trigger to process the wrong new row in its transition table.
What is the impact of successful exploitation?
The issue can cause an AFTER trigger to operate on an incorrect new row. The supplied severity vector indicates low confidentiality and integrity impact, with no availability impact.