Database Integrity Flaw in PostgreSQL Affecting MERGE Operations
CVE-2026-116312
5.4MEDIUM
What is CVE-2026-116312?
A vulnerability in PostgreSQL MERGE functionality has been identified, where inconsistent transition-capture states can lead to incorrect data modifications. Specifically, the issue arises during the execution of AFTER triggers within partitioned table MERGE operations that perform an INSERT before an UPDATE. This could inadvertently cause the trigger to process the wrong new row, potentially compromising data integrity. This affects major versions 15 through 18, specifically minor versions prior to 15.20, 16.16, 17.12, and 18.7, while earlier versions remain unaffected.
Affected Version(s)
PostgreSQL 18 < 18.7
PostgreSQL 17 < 17.12
PostgreSQL 16 < 16.16
References
CVSS V3.1
Score:
5.4
Severity:
MEDIUM
Confidentiality:
Low
Integrity:
Low
Availability:
Low
Attack Vector:
Network
Attack Complexity:
Low
Privileges Required:
Low
User Interaction:
None
Scope:
Unchanged
Timeline
Vulnerability published
Vulnerability Reserved
Credit
The PostgreSQL project thanks Jacek Bylina, Timothy Ball, Jacob Robertson, Nigel Gott, and Claude and Ada Logics for reporting this problem.