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.

Published: 2023-08-11 Last update: 2024-12-06 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2023-39418 is rated Low Risk (35.1/100): CVSS Low severity, with medium exploitation likelihood (EPSS 0.47%). Mandatory action: Monitor for updates and reassess as exploit intelligence or EPSS changes.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2023-39418

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-06-07 0.44% 0.47% +0.03%
2 2026-02-25 0.45% 0.44% -0.01%
3 2026-02-12 0.45%

Full EPSS history (20 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2023-39418

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
3.1 3.1 LOW
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:H)
Even with access, the exploit needs extra luck, timing, or a fussy environment to actually work.
Privileges required (PR:L)
A normal user session is enough; they don’t have to be admin.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:N)
Doesn’t really leak secrets in a meaningful way.
Integrity (I:L)
Attackers could change some data, but it’s limited—not everything goes.
Availability (A:N)
Service keeps running; no real outage angle.
1.6 1.4 [email protected]
4.3 3.1 MEDIUM
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:L)
A normal user session is enough; they don’t have to be admin.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:N)
Doesn’t really leak secrets in a meaningful way.
Integrity (I:L)
Attackers could change some data, but it’s limited—not everything goes.
Availability (A:N)
Service keeps running; no real outage angle.
2.8 1.4 [email protected]

Weakness enumeration for CVE-2023-39418

OS Trackers for CVE-2023-39418

vendor priority summary link
alpine CVE-2023-39418: 4 source package rows (postgresql12, postgresql13, postgresql14, postgresql15); 19 state rows across 11 repos (3.17-main, 3.18-community, 3.18-main, 3.19-community, 3.19-main, 3.20-community, 3.20-main, 3.21-community, 3.22-community, edge-community, edge-main); fixed 19, open 0. https://security.alpinelinux.org/vuln/CVE-2023-39418
debian unimportant CVE-2023-39418 unimportant priority: Debian including 2 source packages (postgresql-13, postgresql-15), 2 status rows across 2 suites (bookworm, bullseye): resolved 2. https://security-tracker.debian.org/tracker/CVE-2023-39418
redhat low https://access.redhat.com/security/cve/CVE-2023-39418
suse medium CVE-2023-39418 severity moderate: SUSE including 386 source package names (14.9-12.30:libpq5-15.4-150200.5.12.1, 15:libpq5-15.4-150200.5.12.1, …), 1351 product×package rows across 65 product lines (Container suse/postgres, Image SLES15-SP3-Manager-4-2-Server-BYOS-Azure, … (65 product lines)): Known Not Affected 911, Known Affected 231, Fixed 209. https://www.suse.com/security/cve/CVE-2023-39418/
ubuntu medium CVE-2023-39418 medium priority: Ubuntu including 7 source packages (postgresql-10, postgresql-12, …), 56 status rows across 8 suites (bionic, focal, jammy, lunar, mantic, trusty, upstream, xenial): DNE 37, needs-triage 6, ignored 5, not-affected 5, released 3. https://ubuntu.com/security/CVE-2023-39418

Affected software / configurations for CVE-2023-39418

Vendor Product Version Raw CPE
postgresql postgresql >= 15.0, < 15.4 cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:*
redhat enterprise_linux 8.0 cpe:2.3:o:redhat:enterprise_linux:8.0:*:*:*:*:*:*:*
redhat enterprise_linux 9.0 cpe:2.3:o:redhat:enterprise_linux:9.0:*:*:*:*:*:*:*
debian debian_linux 12.0 cpe:2.3:o:debian:debian_linux:12.0:*:*:*:*:*:*:*

References for CVE-2023-39418

cvelogic Threat Intelligence