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

Status: published. Published: 2023-08-11. Updated: 2026-11-07.

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.

## Remediation

No remediation reported in collected sources

## Affected products and versions

- Red Hat / Red Hat Enterprise Linux 8 (postgresql:15): ≥ 8090020231114113548.a75119d5; < * (unaffected, rpm). Source: CNA: redhat
- Red Hat / Red Hat Enterprise Linux 8.8 Extended Update Support (postgresql:15): ≥ 8080020231113134015.63b34585; < * (unaffected, rpm). Source: CNA: redhat
- Red Hat / Red Hat Enterprise Linux 9 (postgresql:15): ≥ 9030020231120082734.rhel9; < * (unaffected, rpm). Source: CNA: redhat
- Red Hat / Red Hat Enterprise Linux 9.2 Extended Update Support (postgresql:15): ≥ 9020020231115020618.rhel9; < * (unaffected, rpm). Source: CNA: redhat
- Red Hat / Red Hat Enterprise Linux 6 (postgresql): Version range not reported. Source: CNA: redhat
- Red Hat / Red Hat Enterprise Linux 7 (postgresql): Version range not reported. Source: CNA: redhat
- Red Hat / Red Hat Enterprise Linux 8 (postgresql:10/postgresql): Version range not reported. Source: CNA: redhat
- Red Hat / Red Hat Enterprise Linux 8 (postgresql:12/postgresql): Version range not reported. Source: CNA: redhat
- Red Hat / Red Hat Enterprise Linux 8 (postgresql:13/postgresql): Version range not reported. Source: CNA: redhat
- Red Hat / Red Hat Enterprise Linux 9 (postgresql): Version range not reported. Source: CNA: redhat
- Red Hat / Red Hat Software Collections (rh-postgresql10-postgresql): Version range not reported. Source: CNA: redhat
- Red Hat / Red Hat Software Collections (rh-postgresql12-postgresql): Version range not reported. Source: CNA: redhat
- Red Hat / Red Hat Software Collections (rh-postgresql13-postgresql): Version range not reported. Source: CNA: redhat

## Severity and prioritization

- 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; source: CNA: redhat

- CISA KEV: No listing in collected sources

- EPSS: 1.09% as of 2026-11-06; percentile 65.44%

- SSVC: exploitation none; automatable no; technical impact partial; source ADP: CISA-ADP

- Weaknesses: CWE-1220

## Exploit evidence

No exploit evidence in collected sources. This is not proof of no exploitation.

## References

- https://access.redhat.com/errata/RHSA-2023:7785 (CNA: redhat; vendor-advisory, x_refsource_REDHAT)

- https://access.redhat.com/errata/RHSA-2023:7883 (CNA: redhat; vendor-advisory, x_refsource_REDHAT)

- https://access.redhat.com/errata/RHSA-2023:7884 (CNA: redhat; vendor-advisory, x_refsource_REDHAT)

- https://access.redhat.com/errata/RHSA-2023:7885 (CNA: redhat; vendor-advisory, x_refsource_REDHAT)

- https://access.redhat.com/security/cve/CVE-2023-39418 (CNA: redhat; vdb-entry, x_refsource_REDHAT)

- https://bugzilla.redhat.com/show_bug.cgi?id=2228112 (CNA: redhat; issue-tracking, x_refsource_REDHAT)

- https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=cb2ae5741f2458a474ed3c31458d242e678ff229 (CNA: redhat)

- https://www.postgresql.org/support/security/CVE-2023-39418/ (CNA: redhat)

- https://access.redhat.com/errata/RHSA-2023:7785 (ADP: CVE; vendor-advisory, x_refsource_REDHAT, x_transferred)

- https://access.redhat.com/errata/RHSA-2023:7883 (ADP: CVE; vendor-advisory, x_refsource_REDHAT, x_transferred)

- https://access.redhat.com/errata/RHSA-2023:7884 (ADP: CVE; vendor-advisory, x_refsource_REDHAT, x_transferred)

- https://access.redhat.com/errata/RHSA-2023:7885 (ADP: CVE; vendor-advisory, x_refsource_REDHAT, x_transferred)

- https://access.redhat.com/security/cve/CVE-2023-39418 (ADP: CVE; vdb-entry, x_refsource_REDHAT, x_transferred)

- https://bugzilla.redhat.com/show_bug.cgi?id=2228112 (ADP: CVE; issue-tracking, x_refsource_REDHAT, x_transferred)

- https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=cb2ae5741f2458a474ed3c31458d242e678ff229 (ADP: CVE; x_transferred)

- https://security.netapp.com/advisory/ntap-20230915-0002/ (ADP: CVE; x_transferred)

- https://www.debian.org/security/2023/dsa-5553 (ADP: CVE; x_transferred)

- https://www.postgresql.org/support/security/CVE-2023-39418/ (ADP: CVE; x_transferred)

## Provenance

- CNA: redhat: https://www.cve.org/CVERecord?id=CVE-2023-39418; retrieved 2026-11-07; source updated 2026-11-07

- FIRST EPSS: https://api.first.org/data/v1/epss?cve=CVE-2023-39418; retrieved 2026-11-07; source updated Not reported

Revision: bb9fd10c521ab498c2f3e157863e30725a111ceffed8d59ba4f1ed90b2b945ef

Canonical: https://y2.dev/cve/CVE-2023-39418

## Agent and API access

Public CVE pages, Markdown, and JSON are free to read without an account or API key.

- Public catalog: https://y2.dev/cve/index.json. Follow nextCursor with the same search, filters, sort, and limit (1–100). A null cursor marks the end.

- WebMCP: search_cve_disclosures, get_cve_disclosure, get_cve_page_markdown, get_y2_cve_access. Available in compatible browsers.

- Cyber API: https://api.y2.dev/api/v2/cyber/cves and https://api.y2.dev/api/v2/cyber/cves/{cveId}.

- Y2 Pro or Elite: create a workspace API key with the intel:cyber scope and send Authorization: Bearer <Y2_API_KEY>. Setup: https://y2.dev/docs/api/create-key.

- x402: Pay per request without an account or API key. Omit Authorization, read the HTTP 402 PAYMENT-REQUIRED challenge, validate its current requirements, and retry with PAYMENT-SIGNATURE through an authorized payment client. These browser tools never make payments. Guide: https://y2.dev/docs/api/x402.

- OpenAPI: https://y2.dev/api/openapi.yaml. Agent access metadata: https://y2.dev/cve/agent.json.

Collected public records only. Check source status for coverage and freshness.