CVE-2023-39418
postgresql: MERGE fails to enforce UPDATE or SELECT row security policies
Severity
LowRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · August 10, 2023
Updated · November 21, 2025
Description
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.
Statement
This vulnerability introduced with the use of MERGE Command in PostgreSQL 15 and only affects the databases that have used CREATE POLICY to define a row security policy.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
No mitigation is specified in collected source.
CVSS / CWE
CVSS 3.1 · 3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N
CWE-1220 · Insufficient Granularity of Access Control