CVE-2023-5869

Postgresql: buffer overrun from integer overflow in array modification

8.8 high EPSS 3.24%

Published 10 Dec 2023 Updated 26 Nov 2026 CNA: redhat

Description

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.

Severity (CVSS)

8.8 high CVSS 3.1 from redhat (CNA)
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Attack vector
network: an attacker can reach the vulnerable part over the network, often from the internet
Attack complexity
low: an attack works without special conditions
Privileges required
low: the attacker needs an ordinary user account
User interaction
none: nobody has to click or open anything
Scope
unchanged: the damage stays inside the vulnerable component
Impact
confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)

Exploitation

EPSS 3.24%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 89.0% of all scored CVEs. Scores of 26 Nov 2026.

The assessment of CISA (SSVC, 2 Nov 2026):

Exploitation
none: CISA did not find evidence of exploitation or a public proof of concept
Automatable
no: each attack takes manual steps
Technical impact
total: full control of the component or of its data

Weakness

  • CWE-190 Integer Overflow or Wraparound

Affected products

As the CNA lists them.

ProductVersions
Red Hat Advanced Cluster Security 4.2
package advanced-cluster-security/rhacs-central-db-rhel8
unaffected 4.2.4-6 and later
Other versions: affected
Red Hat Advanced Cluster Security 4.2
package advanced-cluster-security/rhacs-main-rhel8
unaffected 4.2.4-6 and later
Other versions: affected
Red Hat Advanced Cluster Security 4.2
package advanced-cluster-security/rhacs-operator-bundle
unaffected 4.2.4-7 and later
Other versions: affected
Red Hat Advanced Cluster Security 4.2
package advanced-cluster-security/rhacs-scanner-db-rhel8
unaffected 4.2.4-6 and later
Other versions: affected
Red Hat Advanced Cluster Security 4.2
package advanced-cluster-security/rhacs-scanner-db-slim-rhel8
unaffected 4.2.4-7 and later
Other versions: affected
Red Hat Enterprise Linux 7
package postgresql
unaffected 0:9.2.24-9.el7_9 and later
Other versions: affected
Red Hat Enterprise Linux 8
package postgresql:13
unaffected 8090020231114113712.a75119d5 and later
Other versions: affected
Red Hat Enterprise Linux 8
package postgresql:12
unaffected 8090020231128173330.a75119d5 and later
Other versions: affected
Red Hat Enterprise Linux 8
package postgresql:10
unaffected 8090020231201202407.a75119d5 and later
Other versions: affected
Red Hat Enterprise Linux 8
package postgresql:15
unaffected 8090020231114113548.a75119d5 and later
Other versions: affected
Red Hat Enterprise Linux 8.1 Update Services for SAP Solutions
package postgresql:10
unaffected 8010020231130170510.c27ad7f8 and later
Other versions: affected
Red Hat Enterprise Linux 8.2 Advanced Update Support
package postgresql:12
unaffected 8020020231128165246.4cda2c84 and later
Other versions: affected
Red Hat Enterprise Linux 8.2 Advanced Update Support
package postgresql:10
unaffected 8020020231201202149.4cda2c84 and later
Other versions: affected
Red Hat Enterprise Linux 8.2 Telecommunications Update Service
package postgresql:12
unaffected 8020020231128165246.4cda2c84 and later
Other versions: affected
Red Hat Enterprise Linux 8.2 Telecommunications Update Service
package postgresql:10
unaffected 8020020231201202149.4cda2c84 and later
Other versions: affected
Red Hat Enterprise Linux 8.2 Update Services for SAP Solutions
package postgresql:12
unaffected 8020020231128165246.4cda2c84 and later
Other versions: affected
Red Hat Enterprise Linux 8.2 Update Services for SAP Solutions
package postgresql:10
unaffected 8020020231201202149.4cda2c84 and later
Other versions: affected
Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support
package postgresql:12
unaffected 8040020231127153301.522a0ee4 and later
Other versions: affected
Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support
package postgresql:13
unaffected 8040020231127154806.522a0ee4 and later
Other versions: affected
Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support
package postgresql:10
unaffected 8040020231127142440.522a0ee4 and later
Other versions: affected
Red Hat Enterprise Linux 8.4 Telecommunications Update Service
package postgresql:12
unaffected 8040020231127153301.522a0ee4 and later
Other versions: affected
Red Hat Enterprise Linux 8.4 Telecommunications Update Service
package postgresql:13
unaffected 8040020231127154806.522a0ee4 and later
Other versions: affected
Red Hat Enterprise Linux 8.4 Telecommunications Update Service
package postgresql:10
unaffected 8040020231127142440.522a0ee4 and later
Other versions: affected
Red Hat Enterprise Linux 8.4 Update Services for SAP Solutions
package postgresql:12
unaffected 8040020231127153301.522a0ee4 and later
Other versions: affected
Red Hat Enterprise Linux 8.4 Update Services for SAP Solutions
package postgresql:13
unaffected 8040020231127154806.522a0ee4 and later
Other versions: affected
Red Hat Enterprise Linux 8.4 Update Services for SAP Solutions
package postgresql:10
unaffected 8040020231127142440.522a0ee4 and later
Other versions: affected
Red Hat Enterprise Linux 8.6 Extended Update Support
package postgresql:13
unaffected 8060020231114115246.ad008a3a and later
Other versions: affected
Red Hat Enterprise Linux 8.6 Extended Update Support
package postgresql:12
unaffected 8060020231128165328.ad008a3a and later
Other versions: affected
Red Hat Enterprise Linux 8.6 Extended Update Support
package postgresql:10
unaffected 8060020231201202249.ad008a3a and later
Other versions: affected
Red Hat Enterprise Linux 8.8 Extended Update Support
package postgresql:13
unaffected 8080020231114105206.63b34585 and later
Other versions: affected
Red Hat Enterprise Linux 8.8 Extended Update Support
package postgresql:12
unaffected 8080020231128165335.63b34585 and later
Other versions: affected
Red Hat Enterprise Linux 8.8 Extended Update Support
package postgresql:10
unaffected 8080020231201202316.63b34585 and later
Other versions: affected
Red Hat Enterprise Linux 8.8 Extended Update Support
package postgresql:15
unaffected 8080020231113134015.63b34585 and later
Other versions: affected
Red Hat Enterprise Linux 9
package postgresql
unaffected 0:13.13-1.el9_3 and later
Other versions: affected
Red Hat Enterprise Linux 9
package postgresql:15
unaffected 9030020231120082734.rhel9 and later
Other versions: affected
Red Hat Enterprise Linux 9.0 Extended Update Support
package postgresql
unaffected 0:13.13-1.el9_0 and later
Other versions: affected
Red Hat Enterprise Linux 9.2 Extended Update Support
package postgresql:15
unaffected 9020020231115020618.rhel9 and later
Other versions: affected
Red Hat Enterprise Linux 9.2 Extended Update Support
package postgresql
unaffected 0:13.13-1.el9_2 and later
Other versions: affected
Red Hat Software Collections for Red Hat Enterprise Linux 7
package rh-postgresql12-postgresql
unaffected 0:12.17-1.el7 and later
Other versions: affected
Red Hat Software Collections for Red Hat Enterprise Linux 7
package rh-postgresql10-postgresql
unaffected 0:10.23-2.el7 and later
Other versions: affected
Red Hat Software Collections for Red Hat Enterprise Linux 7
package rh-postgresql13-postgresql
unaffected 0:13.13-1.el7 and later
Other versions: affected
RHACS-3.74-RHEL-8
package advanced-cluster-security/rhacs-central-db-rhel8
unaffected 3.74.8-9 and later
Other versions: affected
RHACS-3.74-RHEL-8
package advanced-cluster-security/rhacs-main-rhel8
unaffected 3.74.8-9 and later
Other versions: affected
RHACS-3.74-RHEL-8
package advanced-cluster-security/rhacs-operator-bundle
unaffected 3.74.8-7 and later
Other versions: affected
RHACS-3.74-RHEL-8
package advanced-cluster-security/rhacs-scanner-db-rhel8
unaffected 3.74.8-9 and later
Other versions: affected
RHACS-3.74-RHEL-8
package advanced-cluster-security/rhacs-scanner-db-slim-rhel8
unaffected 3.74.8-9 and later
Other versions: affected
RHACS-4.1-RHEL-8
package advanced-cluster-security/rhacs-central-db-rhel8
unaffected 4.1.6-6 and later
Other versions: affected
RHACS-4.1-RHEL-8
package advanced-cluster-security/rhacs-main-rhel8
unaffected 4.1.6-6 and later
Other versions: affected
RHACS-4.1-RHEL-8
package advanced-cluster-security/rhacs-operator-bundle
unaffected 4.1.6-6 and later
Other versions: affected
RHACS-4.1-RHEL-8
package advanced-cluster-security/rhacs-scanner-db-rhel8
unaffected 4.1.6-6 and later
Other versions: affected
RHACS-4.1-RHEL-8
package advanced-cluster-security/rhacs-scanner-db-slim-rhel8
unaffected 4.1.6-6 and later
Other versions: affected
Red Hat Enterprise Linux 6
package postgresql
unknown the record does not list versions
Red Hat Enterprise Linux 8
package postgresql:16/postgresql
unaffected the record does not list versions
Red Hat Enterprise Linux 9
package postgresql:16/postgresql
unaffected the record does not list versions

Is my server affected?

Find the installed version of postgresql and compare it with the fixed version of your distribution. Distributions often fix a CVE in their own package version, so the version number of the upstream project can mislead.

Debian, Ubuntu

dpkg -l | grep -i postgresql
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2023-5869 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2023-5869

RHEL, Rocky, Alma, Fedora

rpm -q postgresql
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2023-5869

Alpine

apk list --installed | grep -i postgresql

With Trivy, on the host and for a container image; it prints the installed and the fixed version when a package is affected:

trivy rootfs --scanners vuln / | grep CVE-2023-5869
trivy image --scanners vuln IMAGE | grep CVE-2023-5869

Patchbrief matches the package lists of your Linux servers and containers every day against the Trivy vulnerability database, which covers the packages of Linux distributions and language packages (npm, PyPI, Go, Maven and others), and sends one digest with the command that fixes each problem. Install the agent.

References

Advisories

19 more

Other references

Source: the record CVE-2023-5869 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.