CVE-2023-5869Postgresql: buffer overrun from integer overflow in array modification
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.
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
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.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 24.04 | postgresql-16 | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | postgresql-14 | Fixed | 14.10-0ubuntu0.22.04.1 | UBUNTU-CVE-2023-5869 |
| Ubuntu 20.04 | postgresql-12 | Fixed | 12.17-0ubuntu0.20.04.1 | UBUNTU-CVE-2023-5869 |
| Ubuntu 18.04 | postgresql-10 | Fix pending | 10.23-0ubuntu0.18.04.2+esm1 (Ubuntu Pro) | UBUNTU-CVE-2023-5869 |
| Ubuntu 16.04 | postgresql-9.5 | Fix pending | 9.5.25-0ubuntu0.16.04.1+esm6 (Ubuntu Pro) | UBUNTU-CVE-2023-5869 |
| Ubuntu 14.04 | postgresql-9.1 | Fix pending | ||
| Ubuntu 14.04 | postgresql-9.3 | Fix pending | UBUNTU-CVE-2023-5869 | |
| Debian 12 | postgresql-15 | Fixed | 15.5-0+deb12u1 | DEBIAN-CVE-2023-5869 |
| Red Hat Enterprise Linux 9 | pg_repack | Fixed | 0:1.4.8-1.module+el9.2.0+17405+aeb9ec60 | RHSA-2023:7785 |
| Red Hat Enterprise Linux 9 | pgaudit | Fixed | 0:1.7.0-1.module+el9.2.0+17405+aeb9ec60 | RHSA-2023:7785 |
| Red Hat Enterprise Linux 9 | postgres-decoderbufs | Fixed | 0:1.9.7-1.Final.module+el9.2.0+17405+aeb9ec60 | RHSA-2023:7785 |
| Red Hat Enterprise Linux 9 | postgresql | Fixed | 0:13.13-1.el9_3 | RHSA-2023:7785 |
| Red Hat Enterprise Linux 9 | postgresql-contrib | Fixed | 0:15.5-1.module+el9.2.0.z+20667+a2d2a8a9 | RHSA-2023:7784 |
| Red Hat Enterprise Linux 9 | postgresql-docs | Fixed | 0:15.5-1.module+el9.2.0.z+20667+a2d2a8a9 | RHSA-2023:7784 |
| Red Hat Enterprise Linux 9 | postgresql-plperl | Fixed | 0:15.5-1.module+el9.2.0.z+20667+a2d2a8a9 | RHSA-2023:7784 |
| Red Hat Enterprise Linux 9 | postgresql-plpython3 | Fixed | 0:13.13-1.el9_3 | RHSA-2023:7785 |
| Red Hat Enterprise Linux 9 | postgresql-pltcl | Fixed | 0:15.5-1.module+el9.2.0.z+20667+a2d2a8a9 | RHSA-2023:7784 |
| Red Hat Enterprise Linux 9 | postgresql-private-devel | Fixed | 0:13.13-1.el9_3 | RHSA-2023:7785 |
| Red Hat Enterprise Linux 9 | postgresql-private-libs | Fixed | 0:13.13-1.el9_3 | RHSA-2023:7785 |
| Red Hat Enterprise Linux 9 | postgresql-server | Fixed | 0:13.13-1.el9_3 | RHSA-2023:7785 |
| Red Hat Enterprise Linux 9 | postgresql-server-devel | Fixed | 0:13.13-1.el9_3 | RHSA-2023:7785 |
| Red Hat Enterprise Linux 9 | postgresql-static | Fixed | 0:15.5-1.module+el9.2.0.z+20667+a2d2a8a9 | RHSA-2023:7784 |
| Red Hat Enterprise Linux 9 | postgresql-test | Fixed | 0:13.13-1.el9_3 | RHSA-2023:7785 |
| Red Hat Enterprise Linux 9 | postgresql-test-rpm-macros | Fixed | 0:15.5-1.module+el9.2.0.z+20667+a2d2a8a9 | RHSA-2023:7785 |
| Red Hat Enterprise Linux 9 | postgresql-upgrade | Fixed | 0:15.5-1.module+el9.2.0.z+20667+a2d2a8a9 | RHSA-2023:7784 |
| Red Hat Enterprise Linux 9 | postgresql-upgrade-devel | Fixed | 0:13.13-1.el9_3 | RHSA-2023:7785 |
| Red Hat Enterprise Linux 8 | pg_repack | Fixed | 0:1.4.8-1.module+el8.9.0+19797+c4ce5969 | RHSA-2023:7714 |
| Red Hat Enterprise Linux 8 | pgaudit | Fixed | 0:1.5.0-1.module+el8.9.0+20664+9c30cf7f | RHSA-2023:7884 |
| Red Hat Enterprise Linux 8 | postgres-decoderbufs | Fixed | 0:1.9.7-1.Final.module+el8.9.0+19797+c4ce5969 | RHSA-2023:7714 |
| Red Hat Enterprise Linux 8 | postgresql | Fixed | 0:13.13-1.module+el8.9.0+20664+9c30cf7f | RHSA-2023:7790 |
| Red Hat Enterprise Linux 8 | postgresql-contrib | Fixed | 0:12.17-1.module+el8.9.0+20789+410e66ce | RHSA-2023:7884 |
| Red Hat Enterprise Linux 8 | postgresql-docs | Fixed | 0:12.17-1.module+el8.9.0+20789+410e66ce | RHSA-2023:7790 |
| Red Hat Enterprise Linux 8 | postgresql-plperl | Fixed | 0:13.13-1.module+el8.9.0+20664+9c30cf7f | RHSA-2023:7790 |
| Red Hat Enterprise Linux 8 | postgresql-plpython3 | Fixed | 0:10.23-3.module+el8.9.0+20831+78489779 | RHSA-2023:7714 |
| Red Hat Enterprise Linux 8 | postgresql-pltcl | Fixed | 0:10.23-3.module+el8.9.0+20831+78489779 | RHSA-2023:7884 |
| Red Hat Enterprise Linux 8 | postgresql-private-devel | Fixed | 0:15.5-1.module+el8.9.0+20663+03952ce4 | RHSA-2023:7884 |
| Red Hat Enterprise Linux 8 | postgresql-private-libs | Fixed | 0:15.5-1.module+el8.9.0+20663+03952ce4 | RHSA-2023:7884 |
| Red Hat Enterprise Linux 8 | postgresql-server | Fixed | 0:12.17-1.module+el8.9.0+20789+410e66ce | RHSA-2023:7790 |
| Red Hat Enterprise Linux 8 | postgresql-server-devel | Fixed | 0:15.5-1.module+el8.9.0+20663+03952ce4 | RHSA-2023:7581 |
| Red Hat Enterprise Linux 8 | postgresql-static | Fixed | 0:10.23-3.module+el8.9.0+20831+78489779 | RHSA-2023:7714 |
| Red Hat Enterprise Linux 8 | postgresql-test | Fixed | 0:12.17-1.module+el8.9.0+20789+410e66ce | RHSA-2023:7581 |
| Red Hat Enterprise Linux 8 | postgresql-test-rpm-macros | Fixed | 0:15.5-1.module+el8.9.0+20663+03952ce4 | RHSA-2023:7790 |
| Red Hat Enterprise Linux 8 | postgresql-upgrade | Fixed | 0:12.17-1.module+el8.9.0+20789+410e66ce | RHSA-2023:7884 |
| Red Hat Enterprise Linux 8 | postgresql-upgrade-devel | Fixed | 0:15.5-1.module+el8.9.0+20663+03952ce4 | RHSA-2023:7790 |
| Red Hat Enterprise Linux 7 | postgresql | Fixed | 0:9.2.24-9.el7_9 | RHSA-2023:7783 |
| Red Hat Enterprise Linux 7 | postgresql-contrib | Fixed | 0:9.2.24-9.el7_9 | RHSA-2023:7783 |
| Red Hat Enterprise Linux 7 | postgresql-devel | Fixed | 0:9.2.24-9.el7_9 | RHSA-2023:7783 |
| Red Hat Enterprise Linux 7 | postgresql-docs | Fixed | 0:9.2.24-9.el7_9 | RHSA-2023:7783 |
| Red Hat Enterprise Linux 7 | postgresql-libs | Fixed | 0:9.2.24-9.el7_9 | RHSA-2023:7783 |
| Red Hat Enterprise Linux 7 | postgresql-plperl | Fixed | 0:9.2.24-9.el7_9 | RHSA-2023:7783 |
| Red Hat Enterprise Linux 7 | postgresql-plpython | Fixed | 0:9.2.24-9.el7_9 | RHSA-2023:7783 |
| Red Hat Enterprise Linux 7 | postgresql-pltcl | Fixed | 0:9.2.24-9.el7_9 | RHSA-2023:7783 |
| Red Hat Enterprise Linux 7 | postgresql-server | Fixed | 0:9.2.24-9.el7_9 | RHSA-2023:7783 |
| Red Hat Enterprise Linux 7 | postgresql-static | Fixed | 0:9.2.24-9.el7_9 | RHSA-2023:7783 |
| Red Hat Enterprise Linux 7 | postgresql-test | Fixed | 0:9.2.24-9.el7_9 | RHSA-2023:7783 |
| Red Hat Enterprise Linux 7 | postgresql-upgrade | Fixed | 0:9.2.24-9.el7_9 | RHSA-2023:7783 |
| Red Hat Enterprise Linux 6 | postgresql | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | postgresql-contrib | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | postgresql-devel | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | postgresql-docs | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | postgresql-libs | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | postgresql-plperl | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | postgresql-plpython | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | postgresql-pltcl | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | postgresql-server | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | postgresql-test | Will not fix Out of support scope | ||
| AlmaLinux 9 | pg_repack | Fixed | 1.4.8-1.module_el9.2.0+22+09653793 | ALSA-2023:7785 |
| AlmaLinux 9 | pgaudit | Fixed | 1.7.0-1.module_el9.2.0+22+09653793 | ALSA-2023:7785 |
| AlmaLinux 9 | postgres-decoderbufs | Fixed | 1.9.7-1.Final.module_el9.2.0+22+09653793 | ALSA-2023:7785 |
| AlmaLinux 9 | postgresql | Fixed | 13.13-1.el9_3 | ALSA-2023:7785 |
| AlmaLinux 9 | postgresql-contrib | Fixed | 13.13-1.el9_3 | ALSA-2023:7785 |
| AlmaLinux 9 | postgresql-docs | Fixed | 15.5-1.module_el9.3.0+52+21733919 | ALSA-2023:7784 |
| AlmaLinux 9 | postgresql-plperl | Fixed | 15.5-1.module_el9.3.0+52+21733919 | ALSA-2023:7784 |
| AlmaLinux 9 | postgresql-plpython3 | Fixed | 13.13-1.el9_3 | ALSA-2023:7785 |
| AlmaLinux 9 | postgresql-pltcl | Fixed | 15.5-1.module_el9.3.0+52+21733919 | ALSA-2023:7784 |
| AlmaLinux 9 | postgresql-private-devel | Fixed | 15.5-1.module_el9.3.0+52+21733919 | ALSA-2023:7784 |
| AlmaLinux 9 | postgresql-private-libs | Fixed | 15.5-1.module_el9.3.0+52+21733919 | ALSA-2023:7784 |
| AlmaLinux 9 | postgresql-server | Fixed | 15.5-1.module_el9.3.0+52+21733919 | ALSA-2023:7784 |
| AlmaLinux 9 | postgresql-server-devel | Fixed | 15.5-1.module_el9.3.0+52+21733919 | ALSA-2023:7784 |
| AlmaLinux 9 | postgresql-static | Fixed | 15.5-1.module_el9.3.0+52+21733919 | ALSA-2023:7784 |
| AlmaLinux 9 | postgresql-test | Fixed | 15.5-1.module_el9.3.0+52+21733919 | ALSA-2023:7784 |
| AlmaLinux 9 | postgresql-test-rpm-macros | Fixed | 15.5-1.module_el9.3.0+52+21733919 | ALSA-2023:7785 |
| AlmaLinux 9 | postgresql-upgrade | Fixed | 15.5-1.module_el9.3.0+52+21733919 | ALSA-2023:7784 |
| AlmaLinux 9 | postgresql-upgrade-devel | Fixed | 13.13-1.el9_3 | ALSA-2023:7785 |
| AlmaLinux 8 | pg_repack | Fixed | 1.4.8-1.module_el8.8.0+3487+43ec1b9f | ALSA-2023:7581 |
| AlmaLinux 8 | pgaudit | Fixed | 1.4.0-5.module_el8.6.0+2758+4f4474df | ALSA-2023:7581 |
| AlmaLinux 8 | postgres-decoderbufs | Fixed | 0.10.0-2.module_el8.6.0+3095+ee60d910 | ALSA-2023:7884 |
| AlmaLinux 8 | postgresql | Fixed | 12.17-1.module_el8.9.0+3704+f1f917ce | ALSA-2023:7581 |
| AlmaLinux 8 | postgresql-contrib | Fixed | 12.17-1.module_el8.9.0+3704+f1f917ce | ALSA-2023:7790 |
| AlmaLinux 8 | postgresql-docs | Fixed | 12.17-1.module_el8.9.0+3704+f1f917ce | ALSA-2023:7581 |
| AlmaLinux 8 | postgresql-plperl | Fixed | 12.17-1.module_el8.9.0+3704+f1f917ce | ALSA-2023:7581 |
| AlmaLinux 8 | postgresql-plpython3 | Fixed | 10.23-3.module_el8.9.0+3703+a01fd377 | ALSA-2023:7581 |
| AlmaLinux 8 | postgresql-pltcl | Fixed | 12.17-1.module_el8.9.0+3704+f1f917ce | ALSA-2023:7790 |
| AlmaLinux 8 | postgresql-private-devel | Fixed | 15.5-1.module_el8.9.0+3706+885c732e | ALSA-2023:7884 |
| AlmaLinux 8 | postgresql-private-libs | Fixed | 15.5-1.module_el8.9.0+3706+885c732e | ALSA-2023:7884 |
| AlmaLinux 8 | postgresql-server | Fixed | 10.23-3.module_el8.9.0+3703+a01fd377 | ALSA-2023:7884 |
| AlmaLinux 8 | postgresql-server-devel | Fixed | 10.23-3.module_el8.9.0+3703+a01fd377 | ALSA-2023:7884 |
| AlmaLinux 8 | postgresql-static | Fixed | 10.23-3.module_el8.9.0+3703+a01fd377 | ALSA-2023:7884 |
| AlmaLinux 8 | postgresql-test | Fixed | 13.13-1.module_el8.9.0+3692+8714f643 | ALSA-2023:7714 |
| AlmaLinux 8 | postgresql-test-rpm-macros | Fixed | 10.23-3.module_el8.9.0+3703+a01fd377 | ALSA-2023:7581 |
| AlmaLinux 8 | postgresql-upgrade | Fixed | 15.5-1.module_el8.9.0+3706+885c732e | ALSA-2023:7581 |
| AlmaLinux 8 | postgresql-upgrade-devel | Fixed | 10.23-3.module_el8.9.0+3703+a01fd377 | ALSA-2023:7581 |
| Rocky Linux 9 | pgaudit | Fixed | 0:1.7.0-1.module+el9.5.0+30637+4391fcca | RLSA-2023:7785 |
| Rocky Linux 9 | postgres-decoderbufs | Fixed | 0:1.9.7-1.Final.module+el9.5.0+30637+4391fcca | RLSA-2023:7785 |
| Rocky Linux 8 | pg_repack | Fixed | 0:1.4.6-3.module+el8.5.0+684+c3892ef9 | RLSA-2023:7884 |
| Rocky Linux 8 | pgaudit | Fixed | 0:1.5.0-1.module+el8.8.0+1443+0e26d3b2 | RLSA-2023:7884 |
| Rocky Linux 8 | postgres-decoderbufs | Fixed | 0:0.10.0-2.module+el8.5.0+684+c3892ef9 | RLSA-2023:7884 |
| Rocky Linux 8 | postgresql | Fixed | 0:13.13-1.module+el8.9.0+1593+6cfc6c10 | RLSA-2023:7790 |
| Alpine Linux 3.24 | postgresql16 | Fixed | 16.1-r0 | ALPINE-CVE-2023-5869 |
| Alpine Linux 3.23 | postgresql16 | Fixed | 16.1-r0 | ALPINE-CVE-2023-5869 |
| Alpine Linux 3.22 | postgresql15 | Fixed | 15.5-r0 | ALPINE-CVE-2023-5869 |
| Alpine Linux 3.22 | postgresql16 | Fixed | 16.1-r0 | ALPINE-CVE-2023-5869 |
| Alpine Linux 3.21 | postgresql15 | Fixed | 15.5-r0 | ALPINE-CVE-2023-5869 |
| Alpine Linux 3.21 | postgresql16 | Fixed | 16.1-r0 | ALPINE-CVE-2023-5869 |
| Alpine Linux 3.20 | postgresql14 | Fixed | 14.10-r0 | ALPINE-CVE-2023-5869 |
| Alpine Linux 3.20 | postgresql15 | Fixed | 15.5-r0 | ALPINE-CVE-2023-5869 |
| Alpine Linux 3.20 | postgresql16 | Fixed | 16.1-r0 | ALPINE-CVE-2023-5869 |
| Alpine Linux 3.19 | postgresql14 | Fixed | 14.10-r0 | ALPINE-CVE-2023-5869 |
| Alpine Linux 3.19 | postgresql15 | Fixed | 15.5-r0 | ALPINE-CVE-2023-5869 |
| Alpine Linux 3.19 | postgresql16 | Fixed | 16.1-r0 | ALPINE-CVE-2023-5869 |
| Alpine Linux 3.18 | postgresql12 | Fixed | 12.17-r0 | ALPINE-CVE-2023-5869 |
| Alpine Linux 3.18 | postgresql14 | Fixed | 14.10-r0 | ALPINE-CVE-2023-5869 |
| Alpine Linux 3.18 | postgresql15 | Fixed | 15.5-r0 | ALPINE-CVE-2023-5869 |
| Alpine Linux 3.17 | postgresql12 | Fixed | 12.17-r0 | ALPINE-CVE-2023-5869 |
| Alpine Linux 3.17 | postgresql14 | Fixed | 14.10-r0 | ALPINE-CVE-2023-5869 |
| Alpine Linux 3.17 | postgresql15 | Fixed | 15.5-r0 | ALPINE-CVE-2023-5869 |
| Alpine Linux 3.16 | postgresql12 | Fixed | 12.17-r0 | ALPINE-CVE-2023-5869 |
| Alpine Linux 3.16 | postgresql14 | Fixed | 14.10-r0 | ALPINE-CVE-2023-5869 |
| Alpine Linux 3.15 | postgresql12 | Fixed | 12.17-r0 | ALPINE-CVE-2023-5869 |
| Alpine Linux 3.15 | postgresql14 | Fixed | 14.10-r0 | ALPINE-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.
- Red Hat Advanced Cluster Security 4.2
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 8.1 Update Services for SAP Solutions
- Red Hat Enterprise Linux 8.2 Advanced Update Support
- Red Hat Enterprise Linux 8.2 Telecommunications Update Service
- Red Hat Enterprise Linux 8.2 Update Services for SAP Solutions
- Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support
- Red Hat Enterprise Linux 8.4 Telecommunications Update Service
- Red Hat Enterprise Linux 8.4 Update Services for SAP Solutions
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:
- https://access.redhat.com/errata/RHSA-2023:7545 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2023:7579 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2023:7580 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2023:7581 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2023:7616 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2023:7656 (vendor-advisory)
References
- https://access.redhat.com/errata/RHSA-2023:7545
- https://access.redhat.com/errata/RHSA-2023:7579
- https://access.redhat.com/errata/RHSA-2023:7580
- https://access.redhat.com/errata/RHSA-2023:7581
- https://access.redhat.com/errata/RHSA-2023:7616
- https://access.redhat.com/errata/RHSA-2023:7656
- https://access.redhat.com/errata/RHSA-2023:7666
- https://access.redhat.com/errata/RHSA-2023:7667
- https://access.redhat.com/errata/RHSA-2023:7694
- https://access.redhat.com/errata/RHSA-2023:7695
- https://access.redhat.com/errata/RHSA-2023:7714
- https://access.redhat.com/errata/RHSA-2023:7770
- https://access.redhat.com/errata/RHSA-2023:7771
- https://access.redhat.com/errata/RHSA-2023:7772
- https://access.redhat.com/errata/RHSA-2023:7778
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.