CVE-2023-5868 | Postgresql: memory disclosure in aggregate function calls

A memory disclosure vulnerability was found in PostgreSQL that allows remote users to access sensitive information by exploiting certain aggregate function calls with 'unknown'-type arguments. Handling 'unknown'-type values from string literals without type designation can disclose bytes, potentially revealing notable and confidential information. This issue exists due to excessive data output in aggregate function calls, enabling remote users to read some portion of system memory.

Published: 2023-12-10 Last update: 2025-11-04 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2023-5868 is rated Moderate Risk (47.2/100): CVSS Medium severity, with medium exploitation likelihood (EPSS 2.72%). Mandatory action: Review affected assets and schedule remediation.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2023-5868

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-04-02 2.79% 2.72% -0.07%
2 2026-03-19 2.04% 2.79% +0.75%
3 2026-03-14 2.04%

Full EPSS history (36 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2023-5868

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
4.3 3.1 MEDIUM
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:L)
A normal user session is enough; they don’t have to be admin.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:L)
Some sensitive info could get out, but not a total data dump.
Integrity (I:N)
Data isn’t meaningfully altered or forged.
Availability (A:N)
Service keeps running; no real outage angle.
2.8 1.4 [email protected]
4.3 3.1 MEDIUM
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:L)
A normal user session is enough; they don’t have to be admin.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:L)
Some sensitive info could get out, but not a total data dump.
Integrity (I:N)
Data isn’t meaningfully altered or forged.
Availability (A:N)
Service keeps running; no real outage angle.
2.8 1.4 [email protected]

Weakness enumeration for CVE-2023-5868

OS Trackers for CVE-2023-5868

vendor priority summary link
alpine CVE-2023-5868: 6 source package rows (postgresql, postgresql12, postgresql14, postgresql15, postgresql16, postgresql17); 32 state rows across 13 repos (3.17-main, 3.18-community, 3.18-main, 3.19-community, 3.19-main, 3.20-community, 3.20-main, 3.21-community, 3.21-main, 3.22-community, 3.22-main, edge-community, edge-main); fixed 21, open 11. https://security.alpinelinux.org/vuln/CVE-2023-5868
debian not yet assigned CVE-2023-5868 not yet assigned priority: Debian including 2 source packages (postgresql-13, postgresql-15), 2 status rows across 2 suites (bookworm, bullseye): resolved 2. https://security-tracker.debian.org/tracker/CVE-2023-5868
gentoo normal CVE-2023-5868: 1 GLSA(s) (202408-06), 1 atom(s) (dev-db/postgresql); latest impact normal. https://bugs.gentoo.org/buglist.cgi?quicksearch=CVE-2023-5868
redhat medium https://access.redhat.com/security/cve/CVE-2023-5868
suse high CVE-2023-5868 severity important: SUSE including 598 source package names (14.10-24.14:libpq5-16.1-150200.5.7.1, 14.10-24.14:postgresql-16-150400.4.9.2, …), 1413 product×package rows across 45 product lines (Container suse/postgres, Image SLES15-SP4-Manager-Server-4-3, … (45 product lines)): Fixed 1182, Known Affected 231. https://www.suse.com/security/cve/CVE-2023-5868/
ubuntu medium CVE-2023-5868 medium priority: Ubuntu including 8 source packages (postgresql-10, postgresql-12, …), 96 status rows across 12 suites (bionic, focal, jammy, lunar, mantic, noble, oracular, plucky, questing, trusty, upstream, xenial): DNE 77, released 9, ignored 5, not-affected 3, deferred 1, needs-triage 1. https://ubuntu.com/security/CVE-2023-5868

Affected software / configurations for CVE-2023-5868

Vendor Product Version Raw CPE
postgresql postgresql >= 11.0, < 11.22 cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:*
postgresql postgresql >= 12.0, < 12.17 cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:*
postgresql postgresql >= 13.0, < 13.13 cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:*
postgresql postgresql >= 14.0, < 14.10 cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:*
postgresql postgresql >= 15.0, < 15.5 cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:*
postgresql postgresql 16.0 cpe:2.3:a:postgresql:postgresql:16.0:*:*:*:*:*:*:*
redhat codeready_linux_builder_eus 9.2 cpe:2.3:a:redhat:codeready_linux_builder_eus:9.2:*:*:*:*:*:*:*
redhat codeready_linux_builder_eus_for_power_little_endian_eus 9.0_ppc64le cpe:2.3:a: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 cpe:2.3:a:redhat:codeready_linux_builder_eus_for_power_little_endian_eus:9.2_ppc64le:*:*:*:*:*:*:*
redhat codeready_linux_builder_for_arm64_eus 8.6_aarch64 cpe:2.3:a:redhat:codeready_linux_builder_for_arm64_eus:8.6_aarch64:*:*:*:*:*:*:*
redhat codeready_linux_builder_for_arm64_eus 9.0_aarch64 cpe:2.3:a:redhat:codeready_linux_builder_for_arm64_eus:9.0_aarch64:*:*:*:*:*:*:*
redhat codeready_linux_builder_for_arm64_eus 9.2_aarch64 cpe:2.3:a:redhat:codeready_linux_builder_for_arm64_eus:9.2_aarch64:*:*:*:*:*:*:*
redhat codeready_linux_builder_for_ibm_z_systems_eus 9.0_s390x cpe:2.3:a:redhat:codeready_linux_builder_for_ibm_z_systems_eus:9.0_s390x:*:*:*:*:*:*:*
redhat codeready_linux_builder_for_ibm_z_systems_eus 9.2_s390x cpe:2.3:a:redhat:codeready_linux_builder_for_ibm_z_systems_eus:9.2_s390x:*:*:*:*:*:*:*
redhat codeready_linux_builder_for_power_little_endian_eus 9.0_ppc64le cpe:2.3:a:redhat:codeready_linux_builder_for_power_little_endian_eus:9.0_ppc64le:*:*:*:*:*:*:*
redhat codeready_linux_builder_for_power_little_endian_eus 9.2_ppc64le cpe:2.3:a:redhat:codeready_linux_builder_for_power_little_endian_eus:9.2_ppc64le:*:*:*:*:*:*:*
redhat software_collections 1.0 cpe:2.3:a:redhat:software_collections:1.0:*:*:*:*:*:*:*
redhat enterprise_linux 8.0 cpe:2.3:o:redhat:enterprise_linux:8.0:*:*:*:*:*:*:*
redhat enterprise_linux 9.0 cpe:2.3:o:redhat:enterprise_linux:9.0:*:*:*:*:*:*:*
redhat enterprise_linux_eus 8.6 cpe:2.3:o:redhat:enterprise_linux_eus:8.6:*:*:*:*:*:*:*
redhat enterprise_linux_eus 8.8 cpe:2.3:o:redhat:enterprise_linux_eus:8.8:*:*:*:*:*:*:*
redhat enterprise_linux_eus 9.0 cpe:2.3:o:redhat:enterprise_linux_eus:9.0:*:*:*:*:*:*:*
redhat enterprise_linux_eus 9.2 cpe:2.3:o:redhat:enterprise_linux_eus:9.2:*:*:*:*:*:*:*
redhat enterprise_linux_for_arm_64 8.0 cpe:2.3:o:redhat:enterprise_linux_for_arm_64:8.0:*:*:*:*:*:*:*
redhat enterprise_linux_for_arm_64 8.8_aarch64 cpe:2.3:o:redhat:enterprise_linux_for_arm_64:8.8_aarch64:*:*:*:*:*:*:*
redhat enterprise_linux_for_ibm_z_systems 8.0_s390x cpe:2.3:o:redhat:enterprise_linux_for_ibm_z_systems:8.0_s390x:*:*:*:*:*:*:*
redhat enterprise_linux_for_ibm_z_systems_eus 8.6_s390x cpe:2.3:o:redhat:enterprise_linux_for_ibm_z_systems_eus:8.6_s390x:*:*:*:*:*:*:*
redhat enterprise_linux_for_ibm_z_systems_eus 8.8_s390x cpe:2.3:o:redhat:enterprise_linux_for_ibm_z_systems_eus:8.8_s390x:*:*:*:*:*:*:*
redhat enterprise_linux_for_ibm_z_systems_eus 9.0_s390x cpe:2.3:o:redhat:enterprise_linux_for_ibm_z_systems_eus:9.0_s390x:*:*:*:*:*:*:*
redhat enterprise_linux_for_ibm_z_systems_eus 9.2_s390x cpe:2.3:o:redhat:enterprise_linux_for_ibm_z_systems_eus:9.2_s390x:*:*:*:*:*:*:*
redhat enterprise_linux_for_power_little_endian 8.0_ppc64le cpe:2.3:o:redhat:enterprise_linux_for_power_little_endian:8.0_ppc64le:*:*:*:*:*:*:*
redhat enterprise_linux_for_power_little_endian_eus 8.6_ppc64le cpe:2.3:o:redhat:enterprise_linux_for_power_little_endian_eus:8.6_ppc64le:*:*:*:*:*:*:*
redhat enterprise_linux_for_power_little_endian_eus 8.8_ppc64le cpe:2.3:o:redhat:enterprise_linux_for_power_little_endian_eus:8.8_ppc64le:*:*:*:*:*:*:*
redhat enterprise_linux_for_power_little_endian_eus 9.0_ppc64le cpe:2.3:o:redhat:enterprise_linux_for_power_little_endian_eus:9.0_ppc64le:*:*:*:*:*:*:*
redhat enterprise_linux_for_power_little_endian_eus 9.2_ppc64le cpe:2.3:o:redhat:enterprise_linux_for_power_little_endian_eus:9.2_ppc64le:*:*:*:*:*:*:*
redhat enterprise_linux_server_aus 8.2 cpe:2.3:o:redhat:enterprise_linux_server_aus:8.2:*:*:*:*:*:*:*
redhat enterprise_linux_server_aus 8.4 cpe:2.3:o:redhat:enterprise_linux_server_aus:8.4:*:*:*:*:*:*:*
redhat enterprise_linux_server_aus 8.6 cpe:2.3:o:redhat:enterprise_linux_server_aus:8.6:*:*:*:*:*:*:*
redhat enterprise_linux_server_aus 9.2 cpe:2.3:o:redhat:enterprise_linux_server_aus:9.2:*:*:*:*:*:*:*
redhat enterprise_linux_server_tus 8.2 cpe:2.3:o:redhat:enterprise_linux_server_tus:8.2:*:*:*:*:*:*:*
redhat enterprise_linux_server_tus 8.4 cpe:2.3:o:redhat:enterprise_linux_server_tus:8.4:*:*:*:*:*:*:*
redhat enterprise_linux_server_tus 8.6 cpe:2.3:o:redhat:enterprise_linux_server_tus:8.6:*:*:*:*:*:*:*

References for CVE-2023-5868

URL Tags
https://access.redhat.com/errata/RHSA-2023:7545 Third Party Advisory
https://access.redhat.com/errata/RHSA-2023:7579 Third Party Advisory
https://access.redhat.com/errata/RHSA-2023:7580 Third Party Advisory
https://access.redhat.com/errata/RHSA-2023:7581 Third Party Advisory
https://access.redhat.com/errata/RHSA-2023:7616 Third Party Advisory
https://access.redhat.com/errata/RHSA-2023:7656 Third Party Advisory
https://access.redhat.com/errata/RHSA-2023:7666 Third Party Advisory
https://access.redhat.com/errata/RHSA-2023:7667 Third Party Advisory
https://access.redhat.com/errata/RHSA-2023:7694 Third Party Advisory
https://access.redhat.com/errata/RHSA-2023:7695 Third Party Advisory
https://access.redhat.com/errata/RHSA-2023:7714 Third Party Advisory
https://access.redhat.com/errata/RHSA-2023:7770 Third Party Advisory
https://access.redhat.com/errata/RHSA-2023:7772 Third Party Advisory
https://access.redhat.com/errata/RHSA-2023:7784
https://access.redhat.com/errata/RHSA-2023:7785
https://access.redhat.com/errata/RHSA-2023:7883
https://access.redhat.com/errata/RHSA-2023:7884
https://access.redhat.com/errata/RHSA-2023:7885
https://access.redhat.com/errata/RHSA-2024:0304
https://access.redhat.com/errata/RHSA-2024:0332
https://access.redhat.com/errata/RHSA-2024:0337
https://access.redhat.com/security/cve/CVE-2023-5868 Third Party Advisory
https://bugzilla.redhat.com/show_bug.cgi?id=2247168 Issue Tracking
https://www.postgresql.org/about/news/postgresql-161-155-1410-1313-1217-and-1122-released-2749/ Release Notes
https://www.postgresql.org/support/security/CVE-2023-5868/ Mitigation Vendor Advisory
https://lists.debian.org/debian-lts-announce/2023/11/msg00007.html
https://security.netapp.com/advisory/ntap-20240119-0003/
cvelogic Threat Intelligence