{"schemaVersion":3,"id":"CVE-2023-39418","aliases":["ALPINE-CVE-2023-39418","DEBIAN-CVE-2023-39418"],"status":"published","duplicateOf":null,"title":null,"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.","dates":{"published":"2023-08-11T12:19:15.819Z","modified":"2025-11-21T07:05:52.288Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":4.3,"severity":"medium","version":"3.1","versionLabel":"v3.1","source":"NVD","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":3.1,"severity":"low","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Alpine","score":4.3,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N","exploitability":7.2,"impact":2.3,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Debian","score":4.3,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N","exploitability":7.2,"impact":2.3,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":4.3,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.01086,"percentile":0.64772,"severity":"low","asOf":"2026-10-19T00:00:00.000Z","change":{"pp":0.00899999999999998,"baselineDate":"2026-09-19T00:00:00.000Z","baselineScore":0.01077},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.01086,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.01086,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.01086,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.01086,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.01086,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.01086,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.01086,"percentile":0.64772}],"last30":[{"date":"2026-09-19T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.01077,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.01086,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.01086,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.01086,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.01086,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.01086,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.01086,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.01086,"percentile":0.64772}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-1220","name":"Insufficient Granularity of Access Control","description":"The product implements access controls via a policy or other feature with the intention to disable or restrict accesses (reads and/or writes) to assets in a system from untrusted agents. However, implemented access controls lack required granularity, which renders the control policy too broad because it allows accesses from unauthorized agents to the security-sensitive assets.","type":"weakness","status":"Incomplete","abstraction":"Base","likelihoodOfExploit":null,"url":"https://cwe.mitre.org/data/definitions/1220.html"}],"affected":[{"vendor":"alpine","product":"postgresql","name":"postgresql","label":"postgresql","ecosystem":"Alpine Linux","cpePart":null,"purl":"pkg:apk/alpine/postgresql","purlType":"apk","versions":[{"text":"≥ 15.0, < 13.12-r0","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 15.0, < 13.12-r0","eol":null,"hubHref":null},{"vendor":"alpine","product":"postgresql13","name":"postgresql13","label":"postgresql13","ecosystem":"Alpine Linux","cpePart":null,"purl":"pkg:apk/alpine/postgresql13","purlType":"apk","versions":[{"text":"< 13.12-r0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 13.12-r0","eol":null,"hubHref":null},{"vendor":"alpine","product":"postgresql14","name":"postgresql14","label":"postgresql14","ecosystem":"Alpine Linux","cpePart":null,"purl":"pkg:apk/alpine/postgresql14","purlType":"apk","versions":[{"text":"< 14.9-r0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 14.9-r0","eol":null,"hubHref":null},{"vendor":"alpine","product":"postgresql15","name":"postgresql15","label":"postgresql15","ecosystem":"Alpine Linux","cpePart":null,"purl":"pkg:apk/alpine/postgresql15","purlType":"apk","versions":[{"text":"< 15.4-r0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 15.4-r0","eol":null,"hubHref":null},{"vendor":"debian","product":"postgresql-15","name":"postgresql-15","label":"postgresql-15","ecosystem":"Debian","cpePart":null,"purl":"pkg:deb/debian/postgresql-15","purlType":"deb","versions":[{"text":"< 15.5-0+deb12u1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 15.5-0+deb12u1","eol":null,"hubHref":null},{"vendor":"debian","product":"debian_linux","name":"debian linux","label":"debian_linux","ecosystem":null,"cpePart":"o","purl":null,"purlType":null,"versions":[{"text":"12.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"12.0","eol":{"isEol":false,"eolDate":"2028-06-30T00:00:00.000Z","matchMethod":"cpe","cycle":{"name":"12","label":"12 (Bookworm)","eolFrom":"2028-06-30T00:00:00.000Z","isLts":false,"isMaintained":true,"latestVersion":"12.15"},"product":{"name":"debian","label":"Debian","category":"os"}},"hubHref":"/vendor/debian/debian_linux"},{"vendor":"postgresql","product":"postgresql","name":"postgresql","label":"postgresql","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ 15.0, < 15.4","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 15.0, < 15.4","eol":{"isEol":null,"eolDate":null,"matchMethod":"cpe","cycle":null,"product":{"name":"postgresql","label":"PostgreSQL","category":"database"}},"hubHref":"/vendor/postgresql/postgresql"},{"vendor":"redhat","product":"enterprise_linux","name":"enterprise linux","label":"enterprise_linux","ecosystem":null,"cpePart":"o","purl":null,"purlType":null,"versions":[{"text":"8.0","noFixRecorded":false,"fixedIn":null},{"text":"9.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"8.0 | 9.0","eol":{"isEol":false,"eolDate":"2029-05-31T00:00:00.000Z","matchMethod":"cpe","cycle":{"name":"8","label":"8 (Upcoming ELS)","eolFrom":"2029-05-31T00:00:00.000Z","isLts":false,"isMaintained":true,"latestVersion":"8.10"},"product":{"name":"rhel","label":"Red Hat Enterprise Linux","category":"os"}},"hubHref":"/vendor/redhat/enterprise_linux"}],"affectedCount":8,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://access.redhat.com/errata/RHSA-2023:7785","label":"access.redhat.com/errata/RHSA-2023:7785","hostname":"access.redhat.com","tags":["Vendor Advisory","X Refsource REDHAT","Third Party Advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2023:7883","label":"access.redhat.com/errata/RHSA-2023:7883","hostname":"access.redhat.com","tags":["Vendor Advisory","X Refsource REDHAT","Third Party Advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2023:7884","label":"access.redhat.com/errata/RHSA-2023:7884","hostname":"access.redhat.com","tags":["Vendor Advisory","X Refsource REDHAT","Third Party Advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2023:7885","label":"access.redhat.com/errata/RHSA-2023:7885","hostname":"access.redhat.com","tags":["Vendor Advisory","X Refsource REDHAT","Third Party Advisory"]},{"url":"https://access.redhat.com/security/cve/CVE-2023-39418","label":"access.redhat.com/security/cve/CVE-2023-39418","hostname":"access.redhat.com","tags":["VDB Entry","X Refsource REDHAT","Third Party Advisory"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2228112","label":"bugzilla.redhat.com/show_bug.cgi?id=2228112","hostname":"bugzilla.redhat.com","tags":["Issue Tracking","X Refsource REDHAT","Patch","Third Party Advisory"]},{"url":"https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=cb2ae5741f2458a474ed3c31458d242e678ff229","label":"git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=cb2ae5741f2458a474ed3c31458d242e678ff229","hostname":"git.postgresql.org","tags":["Mailing List","Patch"]},{"url":"https://www.postgresql.org/support/security/CVE-2023-39418/","label":"www.postgresql.org/support/security/CVE-2023-39418/","hostname":"www.postgresql.org","tags":["Vendor Advisory"]},{"url":"https://security.netapp.com/advisory/ntap-20230915-0002/","label":"security.netapp.com/advisory/ntap-20230915-0002/","hostname":"security.netapp.com","tags":["X Transferred"]},{"url":"https://www.debian.org/security/2023/dsa-5553","label":"www.debian.org/security/2023/dsa-5553","hostname":"www.debian.org","tags":["X Transferred"]},{"url":"https://security.alpinelinux.org/vuln/CVE-2023-39418","label":"security.alpinelinux.org/vuln/CVE-2023-39418","hostname":"security.alpinelinux.org","tags":["Advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2023-39418","label":"security-tracker.debian.org/tracker/CVE-2023-39418","hostname":"security-tracker.debian.org","tags":["Advisory"]}],"lineage":{"upstream":[],"downstream":["DSA-5553-1","MGASA-2023-0261","OPENSUSE-SU-2024:13134-1","RHSA-2023:7785","RHSA-2023:7883","RHSA-2023:7884","RHSA-2023:7885","SUSE-SU-2023:3342-1","SUSE-SU-2023:3347-1"],"duplicates":[],"related":["OPENSUSE-SU-2024:13134-1","SUSE-SU-2023:3342-1","SUSE-SU-2023:3347-1"]},"timeline":[{"kind":"published","date":"2023-08-11T12:19:15.819Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2025-11-21T07:05:52.288Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":17,"level":"low","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-20T05:21:30.508Z","stale":false,"partial":false}}