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

- Severity: Low 3.1 (CVSS:3.1, scored by redhat) `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.09%, higher than 66% of CVEs (2026-12-01)
- Published: 2023-08-11T12:19:15.819Z
- Modified: 2026-11-27T03:17:00.820Z
- Also known as: BIT-POSTGRESQL-2023-39418
- Weaknesses: CWE-1220
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: redhat

## 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.

(As written by CVE List.)

## Affected

- postgresql:15: no versions given (not affected: from 8090020231114113548.a75119d5 before *; from 8080020231113134015.63b34585 before *; from 9030020231120082734.rhel9 before *; from 9020020231115020618.rhel9 before *)
- postgresql: no versions given
- postgresql:10/postgresql: no versions given
- postgresql:12/postgresql: no versions given
- postgresql:13/postgresql: no versions given
- rh-postgresql10-postgresql: no versions given
- rh-postgresql12-postgresql: no versions given
- rh-postgresql13-postgresql: no versions given
- postgresql postgresql: from 15.0 before 15.4
- redhat enterprise_linux: 8.0; 9.0
- debian debian_linux: 12.0
- postgresql (Bitnami): from 15.0.0 before 15.4.0

## Every score

- redhat: CVSS:3.1 3.1 Low `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N`
- NVD: CVSS:3.1 4.3 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N`
- Bitnami Vulnerability Database: rating Medium

## References

- <https://access.redhat.com/errata/RHSA-2023:7785> (advisory, third-party-advisory, vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2023:7883> (advisory, third-party-advisory, vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2023:7884> (advisory, third-party-advisory, vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2023:7885> (advisory, third-party-advisory, vendor-advisory)
- <https://access.redhat.com/security/cve/CVE-2023-39418> (advisory, third-party-advisory, vdb-entry)
- <https://bugzilla.redhat.com/show_bug.cgi?id=2228112> (advisory, issue-tracking, patch, third-party-advisory)
- <https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=cb2ae5741f2458a474ed3c31458d242e678ff229> (fix, mailing-list, patch)
- <https://www.postgresql.org/support/security/CVE-2023-39418/> (advisory, vendor-advisory)
- <https://security.netapp.com/advisory/ntap-20230915-0002/> (web)
- <https://www.debian.org/security/2023/dsa-5553> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2023-39418> (web)

## Sources

- CVE List: [CVE-2023-39418](https://www.cve.org/CVERecord?id=CVE-2023-39418), CVE Terms of Use, modified 2026-11-07
- NVD: [CVE-2023-39418](https://nvd.nist.gov/vuln/detail/CVE-2023-39418), Public domain, modified 2026-11-27
- Bitnami Vulnerability Database: [BIT-POSTGRESQL-2023-39418](https://osv.dev/vulnerability/BIT-POSTGRESQL-2023-39418), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2023-39418 · Whole record: https://cve.day/CVE-2023-39418.json · Rebuilt by cve.day 2026-11-27T03:17:32.252Z
