CVE-2023-39418: Postgresql: merge fails to enforce update or select row security policies
A vulnerability was found in PostgreSQL with the use of the MERGE command, which fails to test new rows against row security policies defined for UPDATE and SELECT. If UPDATE and SELECT policies forbid some rows that INSERT policies do not forbid, a user could store such rows.
Other sources
PostgreSQL 15 introduced the MERGE command, which fails to test new rows against row security policies defined for UPDATE and SELECT. If UPDATE and SELECT policies forbid some row that INSERT policies do not forbid, a user could store such rows. Subsequent consequences are application-dependent. This affects only databases that have used CREATE POLICY to define a row security policy.
Vulnerable Version: 15
— Red Hat
PostgreSQL could allow a remote authenticated attacker to bypass security restrictions, caused by failing to enforce UPDATE or SELECT row security policies in MERGE command. By sending a specially crafted request, an attacker could exploit this vulnerability to bypass access restrictions.
— IBM
Affected Software
Remediation
Patch Available
Event History
Frequently Asked Questions
What is the vulnerability ID?
The vulnerability ID is CVE-2023-39418.
What is the severity level of CVE-2023-39418?
The severity level of CVE-2023-39418 is medium (4.3).
What is the affected software of CVE-2023-39418?
The affected software of CVE-2023-39418 is PostgreSQL version 15.4 and below on Redhat Enterprise Linux 8.0 and 9.0, and PostgreSQL versions 11, 13, and 15 on Debian and Ubuntu.
What is the description of CVE-2023-39418?
CVE-2023-39418 is a vulnerability in PostgreSQL that occurs when using the MERGE command, which fails to test new rows against row security policies defined for UPDATE and SELECT, potentially allowing a user to store forbidden rows.
Are there any references for CVE-2023-39418?
Yes, you can find references for CVE-2023-39418 at these links: [reference 1](https://bugzilla.redhat.com/show_bug.cgi?id=2228112), [reference 2](https://access.redhat.com/security/cve/CVE-2023-39418), and [reference 3](https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=cb2ae5741f2458a474ed3c31458d242e678ff229).