# Postgresql: memory disclosure in aggregate function calls

CVE record · `CVE-2023-5868`

- **Identifiers:** `CVE-2023-5868`
- **State:** Confirmed
- **Severity:** CVSS 4.3 Medium
- **Critical:** No
- **CNA:** redhat
- **Weakness (CWE):** [CWE-686](https://cwe.mitre.org/data/definitions/686.html)
- **Tags:** [CWE-686](https://agentprime.io/advisories/tag/cwe-686.md)
- **Technologies:** [Red Hat Advanced Cluster Security 4.2](https://agentprime.io/advisories/technology/red-hat-advanced-cluster-security-4-2.md) · [Red Hat Enterprise Linux 8](https://agentprime.io/advisories/technology/red-hat-enterprise-linux-8.md) · [Red Hat Enterprise Linux 8.2 Advanced Update Support](https://agentprime.io/advisories/technology/red-hat-enterprise-linux-8-2-advanced-update-support.md) · [Red Hat Enterprise Linux 8.2 Telecommunications Update Service](https://agentprime.io/advisories/technology/red-hat-enterprise-linux-8-2-telecommunications-update-service.md) · [Red Hat Enterprise Linux 8.2 Update Services for SAP Solutions](https://agentprime.io/advisories/technology/red-hat-enterprise-linux-8-2-update-services-for-sap-solutions.md) · [Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support](https://agentprime.io/advisories/technology/red-hat-enterprise-linux-8-4-advanced-mission-critical-update-support.md) · [Red Hat Enterprise Linux 8.4 Telecommunications Update Service](https://agentprime.io/advisories/technology/red-hat-enterprise-linux-8-4-telecommunications-update-service.md) · [Red Hat Enterprise Linux 8.4 Update Services for SAP Solutions](https://agentprime.io/advisories/technology/red-hat-enterprise-linux-8-4-update-services-for-sap-solutions.md) · [Red Hat Enterprise Linux 8.6 Extended Update Support](https://agentprime.io/advisories/technology/red-hat-enterprise-linux-8-6-extended-update-support.md) · [Red Hat Enterprise Linux 8.8 Extended Update Support](https://agentprime.io/advisories/technology/red-hat-enterprise-linux-8-8-extended-update-support.md) · [Red Hat Enterprise Linux 9](https://agentprime.io/advisories/technology/red-hat-enterprise-linux-9.md) · [Red Hat Enterprise Linux 9.0 Extended Update Support](https://agentprime.io/advisories/technology/red-hat-enterprise-linux-9-0-extended-update-support.md) · [Red Hat Enterprise Linux 9.2 Extended Update Support](https://agentprime.io/advisories/technology/red-hat-enterprise-linux-9-2-extended-update-support.md) · [Red Hat Software Collections for Red Hat Enterprise Linux 7](https://agentprime.io/advisories/technology/red-hat-software-collections-for-red-hat-enterprise-linux-7.md) · [Red Hat RHACS-3.74-RHEL-8](https://agentprime.io/advisories/technology/red-hat-rhacs-3-74-rhel-8.md) · [Red Hat RHACS-4.1-RHEL-8](https://agentprime.io/advisories/technology/red-hat-rhacs-4-1-rhel-8.md) · [Red Hat Enterprise Linux 6](https://agentprime.io/advisories/technology/red-hat-enterprise-linux-6.md) · [Red Hat Enterprise Linux 7](https://agentprime.io/advisories/technology/red-hat-enterprise-linux-7.md) · [Red Hat Software Collections](https://agentprime.io/advisories/technology/red-hat-software-collections.md)
- **Published:** 10 Dec 2023
- **Updated:** 5 Nov 2026
- **Reviewed by a person:** No

Published by the CVE Program (CNA: redhat) at 10 Dec 2023, 17:56 UTC. agentprime has not analysed this yet, so whether it affects any app is not known. This CVE names a vendor and product rather than a package, so the lockfile check doesn’t match it.

## Affected products, as the CNA wrote them

- Vendor: Red Hat. Product: Red Hat Advanced Cluster Security 4.2.
  - unaffected: `4.2.4-6 to before *` (rpm)
  - Other versions: affected
  - Package name: `advanced-cluster-security/rhacs-central-db-rhel8`
  - Collection: `https://catalog.redhat.com/software/containers/`
- Vendor: Red Hat. Product: Red Hat Advanced Cluster Security 4.2.
  - unaffected: `4.2.4-6 to before *` (rpm)
  - Other versions: affected
  - Package name: `advanced-cluster-security/rhacs-main-rhel8`
  - Collection: `https://catalog.redhat.com/software/containers/`
- Vendor: Red Hat. Product: Red Hat Advanced Cluster Security 4.2.
  - unaffected: `4.2.4-7 to before *` (rpm)
  - Other versions: affected
  - Package name: `advanced-cluster-security/rhacs-operator-bundle`
  - Collection: `https://catalog.redhat.com/software/containers/`
- Vendor: Red Hat. Product: Red Hat Advanced Cluster Security 4.2.
  - unaffected: `4.2.4-6 to before *` (rpm)
  - Other versions: affected
  - Package name: `advanced-cluster-security/rhacs-scanner-db-rhel8`
  - Collection: `https://catalog.redhat.com/software/containers/`
- Vendor: Red Hat. Product: Red Hat Advanced Cluster Security 4.2.
  - unaffected: `4.2.4-7 to before *` (rpm)
  - Other versions: affected
  - Package name: `advanced-cluster-security/rhacs-scanner-db-slim-rhel8`
  - Collection: `https://catalog.redhat.com/software/containers/`
- Vendor: Red Hat. Product: Red Hat Enterprise Linux 8.
  - unaffected: `8090020231114113712.a75119d5 to before *` (rpm)
  - Other versions: affected
  - Package name: `postgresql:13`
  - Collection: `https://access.redhat.com/downloads/content/package-browser/`
- Vendor: Red Hat. Product: Red Hat Enterprise Linux 8.
  - unaffected: `8090020231128173330.a75119d5 to before *` (rpm)
  - Other versions: affected
  - Package name: `postgresql:12`
  - Collection: `https://access.redhat.com/downloads/content/package-browser/`
- Vendor: Red Hat. Product: Red Hat Enterprise Linux 8.
  - unaffected: `8090020231114113548.a75119d5 to before *` (rpm)
  - Other versions: affected
  - Package name: `postgresql:15`
  - Collection: `https://access.redhat.com/downloads/content/package-browser/`
- Vendor: Red Hat. Product: Red Hat Enterprise Linux 8.2 Advanced Update Support.
  - unaffected: `8020020231128165246.4cda2c84 to before *` (rpm)
  - Other versions: affected
  - Package name: `postgresql:12`
  - Collection: `https://access.redhat.com/downloads/content/package-browser/`
- Vendor: Red Hat. Product: Red Hat Enterprise Linux 8.2 Telecommunications Update Service.
  - unaffected: `8020020231128165246.4cda2c84 to before *` (rpm)
  - Other versions: affected
  - Package name: `postgresql:12`
  - Collection: `https://access.redhat.com/downloads/content/package-browser/`
- Vendor: Red Hat. Product: Red Hat Enterprise Linux 8.2 Update Services for SAP Solutions.
  - unaffected: `8020020231128165246.4cda2c84 to before *` (rpm)
  - Other versions: affected
  - Package name: `postgresql:12`
  - Collection: `https://access.redhat.com/downloads/content/package-browser/`
- Vendor: Red Hat. Product: Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support.
  - unaffected: `8040020231127153301.522a0ee4 to before *` (rpm)
  - Other versions: affected
  - Package name: `postgresql:12`
  - Collection: `https://access.redhat.com/downloads/content/package-browser/`
- Vendor: Red Hat. Product: Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support.
  - unaffected: `8040020231127154806.522a0ee4 to before *` (rpm)
  - Other versions: affected
  - Package name: `postgresql:13`
  - Collection: `https://access.redhat.com/downloads/content/package-browser/`
- Vendor: Red Hat. Product: Red Hat Enterprise Linux 8.4 Telecommunications Update Service.
  - unaffected: `8040020231127153301.522a0ee4 to before *` (rpm)
  - Other versions: affected
  - Package name: `postgresql:12`
  - Collection: `https://access.redhat.com/downloads/content/package-browser/`
- Vendor: Red Hat. Product: Red Hat Enterprise Linux 8.4 Telecommunications Update Service.
  - unaffected: `8040020231127154806.522a0ee4 to before *` (rpm)
  - Other versions: affected
  - Package name: `postgresql:13`
  - Collection: `https://access.redhat.com/downloads/content/package-browser/`
- Vendor: Red Hat. Product: Red Hat Enterprise Linux 8.4 Update Services for SAP Solutions.
  - unaffected: `8040020231127153301.522a0ee4 to before *` (rpm)
  - Other versions: affected
  - Package name: `postgresql:12`
  - Collection: `https://access.redhat.com/downloads/content/package-browser/`
- Vendor: Red Hat. Product: Red Hat Enterprise Linux 8.4 Update Services for SAP Solutions.
  - unaffected: `8040020231127154806.522a0ee4 to before *` (rpm)
  - Other versions: affected
  - Package name: `postgresql:13`
  - Collection: `https://access.redhat.com/downloads/content/package-browser/`
- Vendor: Red Hat. Product: Red Hat Enterprise Linux 8.6 Extended Update Support.
  - unaffected: `8060020231114115246.ad008a3a to before *` (rpm)
  - Other versions: affected
  - Package name: `postgresql:13`
  - Collection: `https://access.redhat.com/downloads/content/package-browser/`
- Vendor: Red Hat. Product: Red Hat Enterprise Linux 8.6 Extended Update Support.
  - unaffected: `8060020231128165328.ad008a3a to before *` (rpm)
  - Other versions: affected
  - Package name: `postgresql:12`
  - Collection: `https://access.redhat.com/downloads/content/package-browser/`
- Vendor: Red Hat. Product: Red Hat Enterprise Linux 8.8 Extended Update Support.
  - unaffected: `8080020231114105206.63b34585 to before *` (rpm)
  - Other versions: affected
  - Package name: `postgresql:13`
  - Collection: `https://access.redhat.com/downloads/content/package-browser/`
- Vendor: Red Hat. Product: Red Hat Enterprise Linux 8.8 Extended Update Support.
  - unaffected: `8080020231128165335.63b34585 to before *` (rpm)
  - Other versions: affected
  - Package name: `postgresql:12`
  - Collection: `https://access.redhat.com/downloads/content/package-browser/`
- Vendor: Red Hat. Product: Red Hat Enterprise Linux 8.8 Extended Update Support.
  - unaffected: `8080020231113134015.63b34585 to before *` (rpm)
  - Other versions: affected
  - Package name: `postgresql:15`
  - Collection: `https://access.redhat.com/downloads/content/package-browser/`
- Vendor: Red Hat. Product: Red Hat Enterprise Linux 9.
  - unaffected: `0:13.13-1.el9_3 to before *` (rpm)
  - Other versions: affected
  - Package name: `postgresql`
  - Collection: `https://access.redhat.com/downloads/content/package-browser/`
- Vendor: Red Hat. Product: Red Hat Enterprise Linux 9.
  - unaffected: `9030020231120082734.rhel9 to before *` (rpm)
  - Other versions: affected
  - Package name: `postgresql:15`
  - Collection: `https://access.redhat.com/downloads/content/package-browser/`
- Vendor: Red Hat. Product: Red Hat Enterprise Linux 9.0 Extended Update Support.
  - unaffected: `0:13.13-1.el9_0 to before *` (rpm)
  - Other versions: affected
  - Package name: `postgresql`
  - Collection: `https://access.redhat.com/downloads/content/package-browser/`
- Vendor: Red Hat. Product: Red Hat Enterprise Linux 9.2 Extended Update Support.
  - unaffected: `0:13.13-1.el9_2 to before *` (rpm)
  - Other versions: affected
  - Package name: `postgresql`
  - Collection: `https://access.redhat.com/downloads/content/package-browser/`
- Vendor: Red Hat. Product: Red Hat Enterprise Linux 9.2 Extended Update Support.
  - unaffected: `9020020231115020618.rhel9 to before *` (rpm)
  - Other versions: affected
  - Package name: `postgresql:15`
  - Collection: `https://access.redhat.com/downloads/content/package-browser/`
- Vendor: Red Hat. Product: Red Hat Software Collections for Red Hat Enterprise Linux 7.
  - unaffected: `0:12.17-1.el7 to before *` (rpm)
  - Other versions: affected
  - Package name: `rh-postgresql12-postgresql`
  - Collection: `https://access.redhat.com/downloads/content/package-browser/`
- Vendor: Red Hat. Product: Red Hat Software Collections for Red Hat Enterprise Linux 7.
  - unaffected: `0:13.13-1.el7 to before *` (rpm)
  - Other versions: affected
  - Package name: `rh-postgresql13-postgresql`
  - Collection: `https://access.redhat.com/downloads/content/package-browser/`
- Vendor: Red Hat. Product: RHACS-3.74-RHEL-8.
  - unaffected: `3.74.8-9 to before *` (rpm)
  - Other versions: affected
  - Package name: `advanced-cluster-security/rhacs-central-db-rhel8`
  - Collection: `https://catalog.redhat.com/software/containers/`
- Vendor: Red Hat. Product: RHACS-3.74-RHEL-8.
  - unaffected: `3.74.8-9 to before *` (rpm)
  - Other versions: affected
  - Package name: `advanced-cluster-security/rhacs-main-rhel8`
  - Collection: `https://catalog.redhat.com/software/containers/`
- Vendor: Red Hat. Product: RHACS-3.74-RHEL-8.
  - unaffected: `3.74.8-7 to before *` (rpm)
  - Other versions: affected
  - Package name: `advanced-cluster-security/rhacs-operator-bundle`
  - Collection: `https://catalog.redhat.com/software/containers/`
- Vendor: Red Hat. Product: RHACS-3.74-RHEL-8.
  - unaffected: `3.74.8-9 to before *` (rpm)
  - Other versions: affected
  - Package name: `advanced-cluster-security/rhacs-scanner-db-rhel8`
  - Collection: `https://catalog.redhat.com/software/containers/`
- Vendor: Red Hat. Product: RHACS-3.74-RHEL-8.
  - unaffected: `3.74.8-9 to before *` (rpm)
  - Other versions: affected
  - Package name: `advanced-cluster-security/rhacs-scanner-db-slim-rhel8`
  - Collection: `https://catalog.redhat.com/software/containers/`
- Vendor: Red Hat. Product: RHACS-4.1-RHEL-8.
  - unaffected: `4.1.6-6 to before *` (rpm)
  - Other versions: affected
  - Package name: `advanced-cluster-security/rhacs-central-db-rhel8`
  - Collection: `https://catalog.redhat.com/software/containers/`
- Vendor: Red Hat. Product: RHACS-4.1-RHEL-8.
  - unaffected: `4.1.6-6 to before *` (rpm)
  - Other versions: affected
  - Package name: `advanced-cluster-security/rhacs-main-rhel8`
  - Collection: `https://catalog.redhat.com/software/containers/`
- Vendor: Red Hat. Product: RHACS-4.1-RHEL-8.
  - unaffected: `4.1.6-6 to before *` (rpm)
  - Other versions: affected
  - Package name: `advanced-cluster-security/rhacs-operator-bundle`
  - Collection: `https://catalog.redhat.com/software/containers/`
- Vendor: Red Hat. Product: RHACS-4.1-RHEL-8.
  - unaffected: `4.1.6-6 to before *` (rpm)
  - Other versions: affected
  - Package name: `advanced-cluster-security/rhacs-scanner-db-rhel8`
  - Collection: `https://catalog.redhat.com/software/containers/`
- Vendor: Red Hat. Product: RHACS-4.1-RHEL-8.
  - unaffected: `4.1.6-6 to before *` (rpm)
  - Other versions: affected
  - Package name: `advanced-cluster-security/rhacs-scanner-db-slim-rhel8`
  - Collection: `https://catalog.redhat.com/software/containers/`
- Vendor: Red Hat. Product: Red Hat Enterprise Linux 6.
  - No versions given
  - Other versions: unknown
  - Package name: `postgresql`
  - Collection: `https://access.redhat.com/downloads/content/package-browser/`

And 5 more products. The full list is on the CVE record: <https://www.cve.org/CVERecord?id=CVE-2023-5868>

## Not analysed yet

We haven’t published our own analysis of this CVE. If a person reviews it, this page will say what’s affected and what has to be true for it to matter.

## Severity and exploitation

- 4.3 Medium, CVSS 3.1: `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N`, from CNA (redhat)

- **CISA KEV:** Not listed.
- **EPSS:** 0.028, the 86th percentile, on 5 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

## Timeline

- 10 Dec 2023, 17:56 UTC: [Confirmed by the CVE List](https://www.cve.org/CVERecord?id=CVE-2023-5868)
- 10 Dec 2023, 18:15 UTC: [Confirmed by NVD](https://nvd.nist.gov/vuln/detail/CVE-2023-5868)

## Sources

- [CVE List: CVE-2023-5868](https://www.cve.org/CVERecord?id=CVE-2023-5868)
- [NVD: CVE-2023-5868](https://nvd.nist.gov/vuln/detail/CVE-2023-5868)

### References from the CNA

- <https://access.redhat.com/errata/RHSA-2023:7545> (vendor-advisory, redhat)
- <https://access.redhat.com/errata/RHSA-2023:7579> (vendor-advisory, redhat)
- <https://access.redhat.com/errata/RHSA-2023:7580> (vendor-advisory, redhat)
- <https://access.redhat.com/errata/RHSA-2023:7581> (vendor-advisory, redhat)
- <https://access.redhat.com/errata/RHSA-2023:7616> (vendor-advisory, redhat)
- <https://access.redhat.com/errata/RHSA-2023:7656> (vendor-advisory, redhat)
- <https://access.redhat.com/errata/RHSA-2023:7666> (vendor-advisory, redhat)
- <https://access.redhat.com/errata/RHSA-2023:7667> (vendor-advisory, redhat)
- <https://access.redhat.com/errata/RHSA-2023:7694> (vendor-advisory, redhat)
- <https://access.redhat.com/errata/RHSA-2023:7695> (vendor-advisory, redhat)
- <https://access.redhat.com/errata/RHSA-2023:7714> (vendor-advisory, redhat)
- <https://access.redhat.com/errata/RHSA-2023:7770> (vendor-advisory, redhat)
- <https://access.redhat.com/errata/RHSA-2023:7772> (vendor-advisory, redhat)
- <https://access.redhat.com/errata/RHSA-2023:7784> (vendor-advisory, redhat)
- <https://access.redhat.com/errata/RHSA-2023:7785> (vendor-advisory, redhat)
- <https://access.redhat.com/errata/RHSA-2023:7883> (vendor-advisory, redhat)
- <https://access.redhat.com/errata/RHSA-2023:7884> (vendor-advisory, redhat)
- <https://access.redhat.com/errata/RHSA-2023:7885> (vendor-advisory, redhat)
- <https://access.redhat.com/errata/RHSA-2024:0304> (vendor-advisory, redhat)
- <https://access.redhat.com/errata/RHSA-2024:0332> (vendor-advisory, redhat)
- <https://access.redhat.com/errata/RHSA-2024:0337> (vendor-advisory, redhat)
- <https://access.redhat.com/security/cve/CVE-2023-5868> (vdb-entry, redhat)
- <https://bugzilla.redhat.com/show_bug.cgi?id=2247168> (issue-tracking, redhat)
- <https://www.postgresql.org/about/news/postgresql-161-155-1410-1313-1217-and-1122-released-2749/>
- <https://www.postgresql.org/support/security/CVE-2023-5868/>

Facts on this page come from the CVE List as the CNA published them, with CVSS from the sources named above, CISA KEV and FIRST EPSS. Vendors, products and versions are shown as the CNA wrote them. We don’t reproduce the CVE’s description.

## Check whether this affects you

This CVE names a vendor and product rather than a package, so the lockfile check doesn’t match it. Compare the affected versions above with what you run.

- With the agentprime MCP server (<https://api.agentprime.io/mcp>), `get_advisory` returns this record and `search_advisories` finds related ones. Setup: <https://agentprime.io/mcp.md>
- As JSON: <https://api.agentprime.io/v1/advisories/CVE-2023-5868>
- Everything that needs attention now: <https://agentprime.io/advisories/critical.md>

---

The web page: <https://agentprime.io/advisories/CVE-2023-5868/>. Everything for agents: <https://agentprime.io/llms.txt>.
