# CVE-2023-39418: Postgresql: merge fails to enforce update or select row security policies

- Priority: **Routine**
- Reason: Not severe (CVSS 3.1, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2023-08-11 · Modified: 2026-11-27
- Aliases: ALPINE-CVE-2023-39418, DEBIAN-CVE-2023-39418
- Record: https://cvemate.com/vulnerability/CVE-2023-39418 · JSON: https://cvemate.com/vulnerability/CVE-2023-39418/json

## Description

```text
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.
```

## Signals

- CVSS: 4.3 medium (v3.1, NVD) CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N
- EPSS: 1.086%, percentile 66.427%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- alpine postgresql (Alpine Linux): ≥ 15.0, \< 13.12-r0 \| \< 13.12-r0
- alpine postgresql12 (Alpine Linux): \< 12.16-r0
- alpine postgresql13 (Alpine Linux): \< 13.12-r0
- alpine postgresql14 (Alpine Linux): \< 14.9-r0
- alpine postgresql15 (Alpine Linux): \< 15.4-r0
- debian postgresql-15 (Debian): \< 15.5-0+deb12u1
- debian debian\_linux: 12.0
- postgresql postgresql: ≥ 15.0, \< 15.4
- redhat enterprise\_linux: 8.0 \| 9.0

## References

- <https://access.redhat.com/errata/RHSA-2023:7785>
- <https://access.redhat.com/errata/RHSA-2023:7883>
- <https://access.redhat.com/errata/RHSA-2023:7884>
- <https://access.redhat.com/errata/RHSA-2023:7885>
- <https://access.redhat.com/security/cve/CVE-2023-39418>
- <https://bugzilla.redhat.com/show_bug.cgi?id=2228112>
- <https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=cb2ae5741f2458a474ed3c31458d242e678ff229>
- <https://www.postgresql.org/support/security/CVE-2023-39418/>
- <https://security.netapp.com/advisory/ntap-20230915-0002/>
- <https://www.debian.org/security/2023/dsa-5553>
- <https://security.alpinelinux.org/vuln/CVE-2023-39418>
- <https://security-tracker.debian.org/tracker/CVE-2023-39418>

---

Data as of 2026-12-05T04:23:14.371Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
