CVEfocus › CVE database › CVE-2023-5869

CVE-2023-5869Postgresql: buffer overrun from integer overflow in array modification

CVSS 8.8 HighEPSS 3.2% (higher than 89% of CVEs)Published 2023-12-10Updated 2026-11-23Assigner: redhat

A flaw was found in PostgreSQL that allows authenticated database users to execute arbitrary code through missing overflow checks during SQL array value modification. This issue exists due to an integer overflow during array modification where a remote user can trigger the overflow by providing specially crafted data. This enables the execution of arbitrary code on the target system, allowing users to write arbitrary bytes to memory and extensively read the server's memory.

CWE-190

What to do

Fixed builds are available from AlmaLinux, Alpine, Debian, Red Hat, Rocky Linux, Ubuntu: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

115Fixed
4Fix pending
10Will not fix
1Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 24.04postgresql-16Not affected
vulnerable_code_not_present
Ubuntu 22.04postgresql-14Fixed14.10-0ubuntu0.22.04.1UBUNTU-CVE-2023-5869
Ubuntu 20.04postgresql-12Fixed12.17-0ubuntu0.20.04.1UBUNTU-CVE-2023-5869
Ubuntu 18.04postgresql-10Fix pending10.23-0ubuntu0.18.04.2+esm1 (Ubuntu Pro)UBUNTU-CVE-2023-5869
Ubuntu 16.04postgresql-9.5Fix pending9.5.25-0ubuntu0.16.04.1+esm6 (Ubuntu Pro)UBUNTU-CVE-2023-5869
Ubuntu 14.04postgresql-9.1Fix pending
Ubuntu 14.04postgresql-9.3Fix pendingUBUNTU-CVE-2023-5869
Debian 12postgresql-15Fixed15.5-0+deb12u1DEBIAN-CVE-2023-5869
Red Hat Enterprise Linux 9pg_repackFixed0:1.4.8-1.module+el9.2.0+17405+aeb9ec60RHSA-2023:7785
Red Hat Enterprise Linux 9pgauditFixed0:1.7.0-1.module+el9.2.0+17405+aeb9ec60RHSA-2023:7785
Red Hat Enterprise Linux 9postgres-decoderbufsFixed0:1.9.7-1.Final.module+el9.2.0+17405+aeb9ec60RHSA-2023:7785
Red Hat Enterprise Linux 9postgresqlFixed0:13.13-1.el9_3RHSA-2023:7785
Red Hat Enterprise Linux 9postgresql-contribFixed0:15.5-1.module+el9.2.0.z+20667+a2d2a8a9RHSA-2023:7784
Red Hat Enterprise Linux 9postgresql-docsFixed0:15.5-1.module+el9.2.0.z+20667+a2d2a8a9RHSA-2023:7784
Red Hat Enterprise Linux 9postgresql-plperlFixed0:15.5-1.module+el9.2.0.z+20667+a2d2a8a9RHSA-2023:7784
Red Hat Enterprise Linux 9postgresql-plpython3Fixed0:13.13-1.el9_3RHSA-2023:7785
Red Hat Enterprise Linux 9postgresql-pltclFixed0:15.5-1.module+el9.2.0.z+20667+a2d2a8a9RHSA-2023:7784
Red Hat Enterprise Linux 9postgresql-private-develFixed0:13.13-1.el9_3RHSA-2023:7785
Red Hat Enterprise Linux 9postgresql-private-libsFixed0:13.13-1.el9_3RHSA-2023:7785
Red Hat Enterprise Linux 9postgresql-serverFixed0:13.13-1.el9_3RHSA-2023:7785
Red Hat Enterprise Linux 9postgresql-server-develFixed0:13.13-1.el9_3RHSA-2023:7785
Red Hat Enterprise Linux 9postgresql-staticFixed0:15.5-1.module+el9.2.0.z+20667+a2d2a8a9RHSA-2023:7784
Red Hat Enterprise Linux 9postgresql-testFixed0:13.13-1.el9_3RHSA-2023:7785
Red Hat Enterprise Linux 9postgresql-test-rpm-macrosFixed0:15.5-1.module+el9.2.0.z+20667+a2d2a8a9RHSA-2023:7785
Red Hat Enterprise Linux 9postgresql-upgradeFixed0:15.5-1.module+el9.2.0.z+20667+a2d2a8a9RHSA-2023:7784
Red Hat Enterprise Linux 9postgresql-upgrade-develFixed0:13.13-1.el9_3RHSA-2023:7785
Red Hat Enterprise Linux 8pg_repackFixed0:1.4.8-1.module+el8.9.0+19797+c4ce5969RHSA-2023:7714
Red Hat Enterprise Linux 8pgauditFixed0:1.5.0-1.module+el8.9.0+20664+9c30cf7fRHSA-2023:7884
Red Hat Enterprise Linux 8postgres-decoderbufsFixed0:1.9.7-1.Final.module+el8.9.0+19797+c4ce5969RHSA-2023:7714
Red Hat Enterprise Linux 8postgresqlFixed0:13.13-1.module+el8.9.0+20664+9c30cf7fRHSA-2023:7790
Red Hat Enterprise Linux 8postgresql-contribFixed0:12.17-1.module+el8.9.0+20789+410e66ceRHSA-2023:7884
Red Hat Enterprise Linux 8postgresql-docsFixed0:12.17-1.module+el8.9.0+20789+410e66ceRHSA-2023:7790
Red Hat Enterprise Linux 8postgresql-plperlFixed0:13.13-1.module+el8.9.0+20664+9c30cf7fRHSA-2023:7790
Red Hat Enterprise Linux 8postgresql-plpython3Fixed0:10.23-3.module+el8.9.0+20831+78489779RHSA-2023:7714
Red Hat Enterprise Linux 8postgresql-pltclFixed0:10.23-3.module+el8.9.0+20831+78489779RHSA-2023:7884
Red Hat Enterprise Linux 8postgresql-private-develFixed0:15.5-1.module+el8.9.0+20663+03952ce4RHSA-2023:7884
Red Hat Enterprise Linux 8postgresql-private-libsFixed0:15.5-1.module+el8.9.0+20663+03952ce4RHSA-2023:7884
Red Hat Enterprise Linux 8postgresql-serverFixed0:12.17-1.module+el8.9.0+20789+410e66ceRHSA-2023:7790
Red Hat Enterprise Linux 8postgresql-server-develFixed0:15.5-1.module+el8.9.0+20663+03952ce4RHSA-2023:7581
Red Hat Enterprise Linux 8postgresql-staticFixed0:10.23-3.module+el8.9.0+20831+78489779RHSA-2023:7714
Red Hat Enterprise Linux 8postgresql-testFixed0:12.17-1.module+el8.9.0+20789+410e66ceRHSA-2023:7581
Red Hat Enterprise Linux 8postgresql-test-rpm-macrosFixed0:15.5-1.module+el8.9.0+20663+03952ce4RHSA-2023:7790
Red Hat Enterprise Linux 8postgresql-upgradeFixed0:12.17-1.module+el8.9.0+20789+410e66ceRHSA-2023:7884
Red Hat Enterprise Linux 8postgresql-upgrade-develFixed0:15.5-1.module+el8.9.0+20663+03952ce4RHSA-2023:7790
Red Hat Enterprise Linux 7postgresqlFixed0:9.2.24-9.el7_9RHSA-2023:7783
Red Hat Enterprise Linux 7postgresql-contribFixed0:9.2.24-9.el7_9RHSA-2023:7783
Red Hat Enterprise Linux 7postgresql-develFixed0:9.2.24-9.el7_9RHSA-2023:7783
Red Hat Enterprise Linux 7postgresql-docsFixed0:9.2.24-9.el7_9RHSA-2023:7783
Red Hat Enterprise Linux 7postgresql-libsFixed0:9.2.24-9.el7_9RHSA-2023:7783
Red Hat Enterprise Linux 7postgresql-plperlFixed0:9.2.24-9.el7_9RHSA-2023:7783
Red Hat Enterprise Linux 7postgresql-plpythonFixed0:9.2.24-9.el7_9RHSA-2023:7783
Red Hat Enterprise Linux 7postgresql-pltclFixed0:9.2.24-9.el7_9RHSA-2023:7783
Red Hat Enterprise Linux 7postgresql-serverFixed0:9.2.24-9.el7_9RHSA-2023:7783
Red Hat Enterprise Linux 7postgresql-staticFixed0:9.2.24-9.el7_9RHSA-2023:7783
Red Hat Enterprise Linux 7postgresql-testFixed0:9.2.24-9.el7_9RHSA-2023:7783
Red Hat Enterprise Linux 7postgresql-upgradeFixed0:9.2.24-9.el7_9RHSA-2023:7783
Red Hat Enterprise Linux 6postgresqlWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-contribWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-develWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-docsWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-libsWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-plperlWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-plpythonWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-pltclWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-serverWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-testWill not fix
Out of support scope
AlmaLinux 9pg_repackFixed1.4.8-1.module_el9.2.0+22+09653793ALSA-2023:7785
AlmaLinux 9pgauditFixed1.7.0-1.module_el9.2.0+22+09653793ALSA-2023:7785
AlmaLinux 9postgres-decoderbufsFixed1.9.7-1.Final.module_el9.2.0+22+09653793ALSA-2023:7785
AlmaLinux 9postgresqlFixed13.13-1.el9_3ALSA-2023:7785
AlmaLinux 9postgresql-contribFixed13.13-1.el9_3ALSA-2023:7785
AlmaLinux 9postgresql-docsFixed15.5-1.module_el9.3.0+52+21733919ALSA-2023:7784
AlmaLinux 9postgresql-plperlFixed15.5-1.module_el9.3.0+52+21733919ALSA-2023:7784
AlmaLinux 9postgresql-plpython3Fixed13.13-1.el9_3ALSA-2023:7785
AlmaLinux 9postgresql-pltclFixed15.5-1.module_el9.3.0+52+21733919ALSA-2023:7784
AlmaLinux 9postgresql-private-develFixed15.5-1.module_el9.3.0+52+21733919ALSA-2023:7784
AlmaLinux 9postgresql-private-libsFixed15.5-1.module_el9.3.0+52+21733919ALSA-2023:7784
AlmaLinux 9postgresql-serverFixed15.5-1.module_el9.3.0+52+21733919ALSA-2023:7784
AlmaLinux 9postgresql-server-develFixed15.5-1.module_el9.3.0+52+21733919ALSA-2023:7784
AlmaLinux 9postgresql-staticFixed15.5-1.module_el9.3.0+52+21733919ALSA-2023:7784
AlmaLinux 9postgresql-testFixed15.5-1.module_el9.3.0+52+21733919ALSA-2023:7784
AlmaLinux 9postgresql-test-rpm-macrosFixed15.5-1.module_el9.3.0+52+21733919ALSA-2023:7785
AlmaLinux 9postgresql-upgradeFixed15.5-1.module_el9.3.0+52+21733919ALSA-2023:7784
AlmaLinux 9postgresql-upgrade-develFixed13.13-1.el9_3ALSA-2023:7785
AlmaLinux 8pg_repackFixed1.4.8-1.module_el8.8.0+3487+43ec1b9fALSA-2023:7581
AlmaLinux 8pgauditFixed1.4.0-5.module_el8.6.0+2758+4f4474dfALSA-2023:7581
AlmaLinux 8postgres-decoderbufsFixed0.10.0-2.module_el8.6.0+3095+ee60d910ALSA-2023:7884
AlmaLinux 8postgresqlFixed12.17-1.module_el8.9.0+3704+f1f917ceALSA-2023:7581
AlmaLinux 8postgresql-contribFixed12.17-1.module_el8.9.0+3704+f1f917ceALSA-2023:7790
AlmaLinux 8postgresql-docsFixed12.17-1.module_el8.9.0+3704+f1f917ceALSA-2023:7581
AlmaLinux 8postgresql-plperlFixed12.17-1.module_el8.9.0+3704+f1f917ceALSA-2023:7581
AlmaLinux 8postgresql-plpython3Fixed10.23-3.module_el8.9.0+3703+a01fd377ALSA-2023:7581
AlmaLinux 8postgresql-pltclFixed12.17-1.module_el8.9.0+3704+f1f917ceALSA-2023:7790
AlmaLinux 8postgresql-private-develFixed15.5-1.module_el8.9.0+3706+885c732eALSA-2023:7884
AlmaLinux 8postgresql-private-libsFixed15.5-1.module_el8.9.0+3706+885c732eALSA-2023:7884
AlmaLinux 8postgresql-serverFixed10.23-3.module_el8.9.0+3703+a01fd377ALSA-2023:7884
AlmaLinux 8postgresql-server-develFixed10.23-3.module_el8.9.0+3703+a01fd377ALSA-2023:7884
AlmaLinux 8postgresql-staticFixed10.23-3.module_el8.9.0+3703+a01fd377ALSA-2023:7884
AlmaLinux 8postgresql-testFixed13.13-1.module_el8.9.0+3692+8714f643ALSA-2023:7714
AlmaLinux 8postgresql-test-rpm-macrosFixed10.23-3.module_el8.9.0+3703+a01fd377ALSA-2023:7581
AlmaLinux 8postgresql-upgradeFixed15.5-1.module_el8.9.0+3706+885c732eALSA-2023:7581
AlmaLinux 8postgresql-upgrade-develFixed10.23-3.module_el8.9.0+3703+a01fd377ALSA-2023:7581
Rocky Linux 9pgauditFixed0:1.7.0-1.module+el9.5.0+30637+4391fccaRLSA-2023:7785
Rocky Linux 9postgres-decoderbufsFixed0:1.9.7-1.Final.module+el9.5.0+30637+4391fccaRLSA-2023:7785
Rocky Linux 8pg_repackFixed0:1.4.6-3.module+el8.5.0+684+c3892ef9RLSA-2023:7884
Rocky Linux 8pgauditFixed0:1.5.0-1.module+el8.8.0+1443+0e26d3b2RLSA-2023:7884
Rocky Linux 8postgres-decoderbufsFixed0:0.10.0-2.module+el8.5.0+684+c3892ef9RLSA-2023:7884
Rocky Linux 8postgresqlFixed0:13.13-1.module+el8.9.0+1593+6cfc6c10RLSA-2023:7790
Alpine Linux 3.24postgresql16Fixed16.1-r0ALPINE-CVE-2023-5869
Alpine Linux 3.23postgresql16Fixed16.1-r0ALPINE-CVE-2023-5869
Alpine Linux 3.22postgresql15Fixed15.5-r0ALPINE-CVE-2023-5869
Alpine Linux 3.22postgresql16Fixed16.1-r0ALPINE-CVE-2023-5869
Alpine Linux 3.21postgresql15Fixed15.5-r0ALPINE-CVE-2023-5869
Alpine Linux 3.21postgresql16Fixed16.1-r0ALPINE-CVE-2023-5869
Alpine Linux 3.20postgresql14Fixed14.10-r0ALPINE-CVE-2023-5869
Alpine Linux 3.20postgresql15Fixed15.5-r0ALPINE-CVE-2023-5869
Alpine Linux 3.20postgresql16Fixed16.1-r0ALPINE-CVE-2023-5869
Alpine Linux 3.19postgresql14Fixed14.10-r0ALPINE-CVE-2023-5869
Alpine Linux 3.19postgresql15Fixed15.5-r0ALPINE-CVE-2023-5869
Alpine Linux 3.19postgresql16Fixed16.1-r0ALPINE-CVE-2023-5869
Alpine Linux 3.18postgresql12Fixed12.17-r0ALPINE-CVE-2023-5869
Alpine Linux 3.18postgresql14Fixed14.10-r0ALPINE-CVE-2023-5869
Alpine Linux 3.18postgresql15Fixed15.5-r0ALPINE-CVE-2023-5869
Alpine Linux 3.17postgresql12Fixed12.17-r0ALPINE-CVE-2023-5869
Alpine Linux 3.17postgresql14Fixed14.10-r0ALPINE-CVE-2023-5869
Alpine Linux 3.17postgresql15Fixed15.5-r0ALPINE-CVE-2023-5869
Alpine Linux 3.16postgresql12Fixed12.17-r0ALPINE-CVE-2023-5869
Alpine Linux 3.16postgresql14Fixed14.10-r0ALPINE-CVE-2023-5869
Alpine Linux 3.15postgresql12Fixed12.17-r0ALPINE-CVE-2023-5869
Alpine Linux 3.15postgresql14Fixed14.10-r0ALPINE-CVE-2023-5869

What the vendor says

As published in the CVE record by redhat, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Workaround: Red Hat has investigated whether a possible mitigation exists for this issue, and has not been able to identify a practical example. Please update the affected package as soon as possible.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.