PostgreSQL MERGE bypasses RLS UPDATE/SELECT checks, allows unauthorized inserts
CVE-2023-39418 Published on August 11, 2023
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.
Vulnerability Analysis
CVE-2023-39418 is exploitable with network access, and requires small amount of user privileges. This vulnerability is consided to have a high level of attack complexity. The potential impact of an exploit of this vulnerability is considered to have no impact on confidentiality, with no impact on integrity, and no impact on availability.
Timeline
Reported to Red Hat.
Made public. 9 days later.
Weakness Type
Insufficient Granularity of Access Control
The product implements access controls via a policy or other feature with the intention to disable or restrict accesses (reads and/or writes) to assets in a system from untrusted agents. However, implemented access controls lack required granularity, which renders the control policy too broad because it allows accesses from unauthorized agents to the security-sensitive assets.
Products Associated with CVE-2023-39418
You can be notified by email with stack.watch whenever vulnerabilities like CVE-2023-39418 are published in these products:
Affected Versions
Red Hat Enterprise Linux 8:- Version 8090020231114113548.a75119d5 and below * is unaffected.
- Version 8080020231113134015.63b34585 and below * is unaffected.
- Version 9030020231120082734.rhel9 and below * is unaffected.
- Version 9020020231115020618.rhel9 and below * is unaffected.
Exploit Probability
EPSS (Exploit Prediction Scoring System) scores estimate the probability that a vulnerability will be exploited in the wild within the next 30 days. The percentile shows you how this score compares to all other vulnerabilities.