Postgresql: merge fails to enforce update or select row security policies
Summary
| CVE | CVE-2023-39418 |
|---|---|
| State | PUBLISHED |
| Assigner | redhat |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2023-08-11 13:15:09 UTC |
| Updated | 2026-11-27 03:17:00 UTC |
| 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. |
Risk And Classification
Primary CVSS: v3.1 4.3 MEDIUM from [email protected]
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N
EPSS: 0.010860000 probability, percentile 0.655100000 (date 2026-11-08)
Problem Types: CWE-1220 | NVD-CWE-noinfo | CWE-1220 Insufficient Granularity of Access Control
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 3.1 | [email protected] | Primary | 4.3 | MEDIUM | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N |
| 3.1 | [email protected] | Secondary | 3.1 | LOW | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N |
| 3.1 | CNA | CVSS | 3.1 | LOW | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N |
CVSS v3.1 Breakdown
Attack Vector
NetworkAttack Complexity
LowPrivileges Required
LowUser Interaction
NoneScope
UnchangedConfidentiality
NoneIntegrity
LowAvailability
NoneCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N
NVD Known Affected Configurations (CPE 2.3)
| Type | Vendor | Product | Version | Update | Edition | Language |
|---|---|---|---|---|---|---|
| Operating System | Debian | Debian Linux | 12.0 | All | All | All |
| Application | Postgresql | Postgresql | All | All | All | All |
| Operating System | Redhat | Enterprise Linux | 8.0 | All | All | All |
| Operating System | Redhat | Enterprise Linux | 9.0 | All | All | All |
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|---|---|---|---|
| CNA | Red Hat | Red Hat Enterprise Linux 8 | unaffected 8090020231114113548.a75119d5 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 8.8 Extended Update Support | unaffected 8080020231113134015.63b34585 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 9 | unaffected 9030020231120082734.rhel9 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 9.2 Extended Update Support | unaffected 9020020231115020618.rhel9 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 6 | Not specified | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 7 | Not specified | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 8 | Not specified | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 8 | Not specified | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 8 | Not specified | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 9 | Not specified | Not specified |
| CNA | Red Hat | Red Hat Software Collections | Not specified | Not specified |
| CNA | Red Hat | Red Hat Software Collections | Not specified | Not specified |
| CNA | Red Hat | Red Hat Software Collections | Not specified | Not specified |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| 2228112 – (CVE-2023-39418) CVE-2023-39418 postgresql: MERGE fails to enforce UPDATE or SELECT row security policies | af854a3a-2127-422b-91ae-364da2661108 | bugzilla.redhat.com | Issue Tracking, Patch, Third Party Advisory |
| access.redhat.com/errata/RHSA-2023:7785 | af854a3a-2127-422b-91ae-364da2661108 | access.redhat.com | Third Party Advisory |
| Debian -- Security Information -- DSA-5553-1 postgresql-15 | af854a3a-2127-422b-91ae-364da2661108 | www.debian.org | |
| access.redhat.com/errata/RHSA-2023:7884 | af854a3a-2127-422b-91ae-364da2661108 | access.redhat.com | Third Party Advisory |
| access.redhat.com/errata/RHSA-2023:7883 | af854a3a-2127-422b-91ae-364da2661108 | access.redhat.com | Third Party Advisory |
| access.redhat.com/errata/RHSA-2023:7885 | af854a3a-2127-422b-91ae-364da2661108 | access.redhat.com | Third Party Advisory |
| PostgreSQL: CVE-2023-39418: MERGE fails to enforce UPDATE or SELECT row security policies | af854a3a-2127-422b-91ae-364da2661108 | www.postgresql.org | Vendor Advisory |
| cve-details | af854a3a-2127-422b-91ae-364da2661108 | access.redhat.com | Third Party Advisory |
| git.postgresql.org Git - postgresql.git/commitdiff | af854a3a-2127-422b-91ae-364da2661108 | git.postgresql.org | Mailing List, Patch |
| August 2023 PostgreSQL Vulnerabilities in NetApp Products | NetApp Product Security | af854a3a-2127-422b-91ae-364da2661108 | security.netapp.com | |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
No vendor comments have been submitted for this CVE.
Additional Advisory Data
| Source | Time | Event |
|---|---|---|
| CNA | 2023-08-01T00:00:00.000Z | Reported to Red Hat. |
| CNA | 2023-08-10T00:00:00.000Z | Made public. |
Legacy QID Mappings
- 161232 Oracle Enterprise Linux Security Update for postgresql:15 (ELSA-2023-7785)
- 161253 Oracle Enterprise Linux Security Update for postgresql:15 (ELSA-2023-7884)
- 199665 Ubuntu Security Notification for PostgreSQL Vulnerabilities (USN-6296-1)
- 242614 Red Hat Update for postgresql:15 (RHSA-2023:7785)
- 242634 Red Hat Update for postgresql:15 (RHSA-2023:7885)
- 242636 Red Hat Update for postgresql:15 (RHSA-2023:7883)
- 242657 Red Hat Update for postgresql:15 (RHSA-2023:7884)
- 356538 Amazon Linux Security Advisory for postgresql15 : ALAS2023-2023-387
- 503280 Alpine Linux Security Update for postgresql
- 503281 Alpine Linux Security Update for postgresql13
- 503282 Alpine Linux Security Update for postgresql14
- 503283 Alpine Linux Security Update for postgresql12
- 503284 Alpine Linux Security Update for postgresql15
- 505920 Alpine Linux Security Update for postgresql15
- 506163 Alpine Linux Security Update for postgresql13
- 506165 Alpine Linux Security Update for postgresql14
- 6000322 Debian Security Update for postgresql-15 (DSA 5553-1)
- 691229 Free Berkeley Software Distribution (FreeBSD) Security Update for postgresql (59a43a73-3786-11ee-94b4-6cc21735f730)
- 754278 SUSE Enterprise Linux Security Update for postgresql15 (SUSE-SU-2023:3342-1)
- 941510 AlmaLinux Security Update for postgresql:15 (ALSA-2023:7785)
- 941512 AlmaLinux Security Update for postgresql:15 (ALSA-2023:7884)