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

Published Oct 31, 2023
·
Updated

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.

Other sources

PostgreSQL is vulnerable to a buffer overflow, caused by improper bounds checking by the SQL array values. By sending a specially crafted request, a remote authenticated attacker could overflow a buffer and execute arbitrary code on the system.

— IBM

While modifying certain SQL array values, missing overflow checks let authenticated database users write arbitrary bytes to a memory area that facilitates arbitrary code execution. Missing overflow checks also let authenticated database users read a wide area of server memory. The CVE-2021-32027 fix covered some attacks of this description, but it missed others.

— Red Hat

Affected Software

91 affected componentsFixes available
IBM Security Guardium<=11.3
IBM Security Guardium<=11.4
IBM Security Guardium<=11.5
IBM Security Guardium<=12.0
PostgreSQL postgresql>=11.0<11.22
PostgreSQL postgresql>=12.0<12.17
PostgreSQL postgresql>=13.0<13.13
PostgreSQL postgresql>=14.0<14.10
PostgreSQL postgresql>=15.0<15.5
PostgreSQL postgresql=16.0
redhat Codeready Linux Builder Eus=9.2
redhat Codeready Linux Builder Eus For Power Little Endian Eus=9.0_ppc64le
redhat Codeready Linux Builder Eus For Power Little Endian Eus=9.2_ppc64le
redhat Codeready Linux Builder For Arm64 Eus=8.6_aarch64
redhat Codeready Linux Builder For Arm64 Eus=9.0_aarch64
redhat Codeready Linux Builder For Arm64 Eus=9.2_aarch64
redhat Codeready Linux Builder For Ibm Z Systems Eus=9.0_s390x
redhat Codeready Linux Builder For Ibm Z Systems Eus=9.2_s390x
redhat Codeready Linux Builder For Power Little Endian Eus=9.0_ppc64le
redhat Codeready Linux Builder For Power Little Endian Eus=9.2_ppc64le
redhat Software Collections=1.0
redhat Enterprise Linux=8.0
redhat Enterprise Linux=9.0
redhat Enterprise Linux Desktop=7.0
redhat Enterprise Linux Eus=8.6
redhat Enterprise Linux Eus=8.8
redhat Enterprise Linux Eus=9.0
redhat Enterprise Linux Eus=9.2
redhat Enterprise Linux For Arm 64=8.0
redhat Enterprise Linux For Arm 64=8.8_aarch64
redhat Enterprise Linux For Ibm Z Systems=7.0_s390x
redhat Enterprise Linux For Ibm Z Systems=8.0_s390x
redhat Enterprise Linux For Ibm Z Systems Eus=8.6_s390x
redhat Enterprise Linux For Ibm Z Systems Eus=8.8_s390x
redhat Enterprise Linux For Ibm Z Systems Eus=9.0_s390x
redhat Enterprise Linux For Ibm Z Systems Eus=9.2_s390x
redhat Enterprise Linux For Power Big Endian=7.0_ppc64
redhat Enterprise Linux For Power Little Endian=7.0_ppc64le
redhat Enterprise Linux For Power Little Endian=8.0_ppc64le
redhat Enterprise Linux For Power Little Endian Eus=8.6_ppc64le
redhat Enterprise Linux For Power Little Endian Eus=8.8_ppc64le
redhat Enterprise Linux For Power Little Endian Eus=9.0_ppc64le
redhat Enterprise Linux For Power Little Endian Eus=9.2_ppc64le
redhat Enterprise Linux For Scientific Computing=7.0
redhat Enterprise Linux Server=7.0
redhat Enterprise Linux Server Aus=8.2
redhat Enterprise Linux Server Aus=8.4
redhat Enterprise Linux Server Aus=8.6
redhat Enterprise Linux Server Aus=9.2
redhat Enterprise Linux Server Tus=8.2
redhat Enterprise Linux Server Tus=8.4
redhat Enterprise Linux Server Tus=8.6
redhat Enterprise Linux Workstation=7.0
redhat/postgresql<16.1
16.1
redhat/postgresql<15.5
15.5
redhat/postgresql<14.10
14.10
redhat/postgresql<13.13
13.13
redhat/postgresql<12.17
12.17
redhat/postgresql<11.22
11.22
alpine/postgresql12<12.17-r0
12.17-r0
alpine/postgresql12<12.17-r0
12.17-r0
alpine/postgresql12<12.17-r0
12.17-r0
alpine/postgresql12<12.17-r0
12.17-r0
alpine/postgresql14<14.10-r0
14.10-r0
alpine/postgresql14<14.10-r0
14.10-r0
alpine/postgresql14<14.10-r0
14.10-r0
alpine/postgresql14<14.10-r0
14.10-r0
alpine/postgresql14<14.10-r0
14.10-r0
alpine/postgresql14<14.10-r0
14.10-r0
alpine/postgresql15<15.5-r0
15.5-r0
alpine/postgresql15<15.5-r0
15.5-r0
alpine/postgresql15<15.5-r0
15.5-r0
alpine/postgresql15<15.5-r0
15.5-r0
alpine/postgresql15<15.5-r0
15.5-r0
alpine/postgresql15<15.5-r0
15.5-r0
alpine/postgresql16<16.1-r0
16.1-r0
alpine/postgresql16<16.1-r0
16.1-r0
alpine/postgresql16<16.1-r0
16.1-r0
alpine/postgresql16<16.1-r0
16.1-r0
alpine/postgresql16<16.1-r0
16.1-r0
alpine/postgresql16<16.1-r0
16.1-r0
debian/postgresql-15
15.5-0+deb12u1
debian/postgresql-11
11.22-0+deb10u1
debian/postgresql-13
13.13-0+deb11u1
debian/postgresql-16
16.1-1
debian/postgresql-15<15.5-0+deb12u1
15.5-0+deb12u1
ubuntu/postgresql-9.3*
ubuntu/postgresql-9.5<9.5.25-0ubuntu0.16.04.1+esm6
9.5.25-0ubuntu0.16.04.1+esm6
ubuntu/postgresql-10<10.23-0ubuntu0.18.04.2+esm1
10.23-0ubuntu0.18.04.2+esm1
ubuntu/postgresql-12<12.17-0ubuntu0.20.04.1
12.17-0ubuntu0.20.04.1
ubuntu/postgresql-14<14.10-0ubuntu0.22.04.1
14.10-0ubuntu0.22.04.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade redhat/PostgreSQL to a version that resolves this vulnerability.

    Fixed in 16.1
  2. Upgrade

    Upgrade redhat/PostgreSQL to a version that resolves this vulnerability.

    Fixed in 15.5
  3. Upgrade

    Upgrade redhat/PostgreSQL to a version that resolves this vulnerability.

    Fixed in 14.10
  4. Upgrade

    Upgrade redhat/PostgreSQL to a version that resolves this vulnerability.

    Fixed in 13.13
  5. Upgrade

    Upgrade redhat/PostgreSQL to a version that resolves this vulnerability.

    Fixed in 12.17
  6. Upgrade

    Upgrade redhat/PostgreSQL to a version that resolves this vulnerability.

    Fixed in 11.22
  7. Upgrade

    Upgrade alpine/postgresql12 to a version that resolves this vulnerability.

    Fixed in 12.17-r0
  8. Upgrade

    Upgrade alpine/postgresql14 to a version that resolves this vulnerability.

    Fixed in 14.10-r0
  9. Upgrade

    Upgrade alpine/postgresql15 to a version that resolves this vulnerability.

    Fixed in 15.5-r0
  10. Upgrade

    Upgrade alpine/postgresql16 to a version that resolves this vulnerability.

    Fixed in 16.1-r0
  11. Upgrade

    Upgrade debian/postgresql-15 to a version that resolves this vulnerability.

    Fixed in 15.5-0+deb12u1
  12. Upgrade

    Upgrade debian/postgresql-11 to a version that resolves this vulnerability.

    Fixed in 11.22-0+deb10u1
  13. Upgrade

    Upgrade debian/postgresql-13 to a version that resolves this vulnerability.

    Fixed in 13.13-0+deb11u1
  14. Upgrade

    Upgrade debian/postgresql-16 to a version that resolves this vulnerability.

    Fixed in 16.1-1
  15. Upgrade

    Upgrade ubuntu/postgresql-9.5 to a version that resolves this vulnerability.

    Fixed in 9.5.25-0ubuntu0.16.04.1+esm6
  16. Upgrade

    Upgrade ubuntu/postgresql-10 to a version that resolves this vulnerability.

    Fixed in 10.23-0ubuntu0.18.04.2+esm1
  17. Upgrade

    Upgrade ubuntu/postgresql-12 to a version that resolves this vulnerability.

    Fixed in 12.17-0ubuntu0.20.04.1
  18. Upgrade

    Upgrade ubuntu/postgresql-14 to a version that resolves this vulnerability.

    Fixed in 14.10-0ubuntu0.22.04.1

Event History

Oct 31, 2023
Data Sourced
04:11 AM
DescriptionSeverityAffected Software
Nov 15, 2023
CVE Published
12:00 AM
Data Sourced
12:00 AM
Remedy
Data Sourced
via Ubuntu·12:00 AM
RemedyDescriptionSeverityAffected Software
Data Sourced
via OSV·12:00 AM
DescriptionSeverityAffected Software
Updated
12:00 AM
Affected Software
Updated
via Ubuntu·12:00 AM
DescriptionAffected Software
Dec 10, 2023
CVE Published
via MITRE·05:56 PM
Data Sourced
05:56 PM
Weakness
Dec 13, 2023
Updated
09:32 PM
SeverityWeakness
Updated
10:15 PM
Affected Software
Dec 19, 2023
Updated
06:15 AM
WeaknessAffected Software
Updated
10:15 AM
Affected Software
Dec 20, 2023
Updated
02:39 PM
Weakness
Updated
03:15 PM
Affected Software
Updated
03:15 PM
WeaknessAffected Software
Jan 10, 2024
Data Sourced
via Red Hat·08:29 AM
DescriptionSeverityAffected Software
Jan 17, 2024
Data Sourced
via MITRE·09:32 PM
DescriptionSeverityWeakness
Jan 19, 2024
Data Sourced
via NVD·03:15 AM
DescriptionSeverityWeaknessAffected Software
Updated
via NVD·03:15 AM
Affected Software
Updated
via NVD·04:15 PM
Affected Software
Jan 22, 2024
Updated
via NVD·09:15 PM
Affected Software
Jan 25, 2024
Updated
via NVD·09:15 AM
Affected Software
Feb 2, 2024
Data Sourced
via IBM·12:00 AM
DescriptionSeverityAffected Software
May 10, 2024
Updated
via IBM·12:00 AM
Affected Software
May 24, 2024
Updated
via IBM·12:00 AM
Affected Software
Sep 14, 2024
Updated
via NVD·12:15 AM
Affected Software
Nov 4, 2025
Updated
via NVD·08:17 PM
Affected Software
Nov 26, 2026
Updated
via NVD·02:17 PM
Affected Software

Parent advisories

This vulnerability appears in the following advisories.

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

What is CVE-2023-5869?

CVE-2023-5869 is a vulnerability that allows for buffer overrun from integer overflow in array modification.

2

How severe is CVE-2023-5869?

CVE-2023-5869 has a severity level of high (7).

3

Which software versions are affected by CVE-2023-5869?

The affected software versions include postgresql-11, postgresql-13, postgresql-15, postgresql-16, PostgreSQL, and postgresql-14.

4

How can I fix CVE-2023-5869?

To fix CVE-2023-5869, update your PostgreSQL package to the recommended remedy versions provided by the source (debian, redhat, or ubuntu).

5

Where can I find more information about CVE-2023-5869?

You can find more information about CVE-2023-5869 at the following references: [link1], [link2], [link3].

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203