CVE-2023-5868: Postgresql: memory disclosure in aggregate function calls
Noroxi assessment
Priority: Monitor (action score 18/100)
- The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
- Probability of exploitation in the next 30 days: 2.7% (FIRST EPSS); higher than 86.5% of all records.
- Anyone who can reach it over the internet can trigger it. A low-privileged account is enough. No user action is required. No special conditions are required; it is repeatable.
- According to CISA the attack is automatable: targets can be found by mass scanning.
- Fixed version: pg_repack (AlmaLinux:8) 1.4.6-3.module_el8.6.0+3094+eb237fb8, 1.4.6-3.module_el8.6.0+3095+ee60d910, 1.4.6-3.module_el8.6.0+2758+4f4474df; pgaudit (AlmaLinux:8) 1.5.0-1.module_el8.6.0+3095+ee60d910, 1.4.0-5.module_el8.6.0+3094+eb237fb8, 1.7.0-1.module_el8.8.0+3487+43ec1b9f; postgres-decoderbufs (AlmaLinux:8) 0.10.0-2.module_el8.6.0+3095+ee60d910, 0.10.0-2.module_el8.6.0+3094+eb237fb8, 1.9.7-1.Final.module_el8.8.0+3487+43ec1b9f.
Low priority for now. Upgrade to pg_repack (AlmaLinux:8) 1.4.6-3.module_el8.6.0+3094+eb237fb8, 1.4.6-3.module_el8.6.0+3095+ee60d910, 1.4.6-3.module_el8.6.0+2758+4f4474df; pgaudit (AlmaLinux:8) 1.5.0-1.module_el8.6.0+3095+ee60d910, 1.4.0-5.module_el8.6.0+3094+eb237fb8, 1.7.0-1.module_el8.8.0+3487+43ec1b9f; postgres-decoderbufs (AlmaLinux:8) 0.10.0-2.module_el8.6.0+3095+ee60d910, 0.10.0-2.module_el8.6.0+3094+eb237fb8, 1.9.7-1.Final.module_el8.8.0+3487+43ec1b9f or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
Primary sources: NVD · CVE.org · FIRST EPSS
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.
- BDU:2023-07905
- ALSA-2023:7581
- ALSA-2023:7714
- ALSA-2023:7784
- ALSA-2023:7785
- ALSA-2023:7884
- DLA-3651-1
- DSA-5553-1
- DSA-5554-1
- openSUSE-SU-2024:13408-1
- openSUSE-SU-2024:13409-1
- openSUSE-SU-2024:13410-1
- openSUSE-SU-2024:13413-1
- openSUSE-SU-2024:13414-1
- openSUSE-SU-2024:13668-1
- openSUSE-SU-2025:15580-1
- RHSA-2023:7545
- RHSA-2023:7579
- RHSA-2023:7580
- RHSA-2023:7581
- Published
- Dec 10, 2023
- Updated
- Nov 5, 2026
- EPSS
- 2.7% · 86th percentile
- CWE
- CWE-686
Report tools
Action score
18
Low priority for now.
- CVSS
- 17 / 40 · 4.3 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 1 / 30 · 2.7%
CISA SSVC decision
- Exploitation
- none
- Automatable
- yes
- Technical impact
- partial
Vulnrichment: CISA's decision-tree inputs.
CNA vs NVD score
- NVD
- 4.3
- CNA · redhat
- 4.3
- agree
The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.
Get told when this record changes
- Not in KEV: no record of exploitation in the wild
- No public exploit code on record
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Is PostgreSQL on your server exposed to the internet?Run a port scan
Is your version affected? Check itNoroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
| Vendor | Product | CPE |
|---|---|---|
| postgresql | postgresql | cpe:2.3:a:postgresql:postgresql |
| redhat | codeready linux builder eus | cpe:2.3:a:redhat:codeready_linux_builder_eus |
| redhat | codeready linux builder eus for power little endian eus | cpe:2.3:a:redhat:codeready_linux_builder_eus_for_power_little_endian_eus |
| redhat | codeready linux builder for arm64 eus | cpe:2.3:a:redhat:codeready_linux_builder_for_arm64_eus |
| redhat | codeready linux builder for ibm z systems eus | cpe:2.3:a:redhat:codeready_linux_builder_for_ibm_z_systems_eus |
| redhat | codeready linux builder for power little endian eus | cpe:2.3:a:redhat:codeready_linux_builder_for_power_little_endian_eus |
| redhat | software collections | cpe:2.3:a:redhat:software_collections |
| redhat | enterprise linux | cpe:2.3:o:redhat:enterprise_linux |
| redhat | enterprise linux eus | cpe:2.3:o:redhat:enterprise_linux_eus |
| redhat | enterprise linux for arm 64 | cpe:2.3:o:redhat:enterprise_linux_for_arm_64 |
| redhat | enterprise linux for ibm z systems | cpe:2.3:o:redhat:enterprise_linux_for_ibm_z_systems |
| redhat | enterprise linux for ibm z systems eus | cpe:2.3:o:redhat:enterprise_linux_for_ibm_z_systems_eus |
and 4 more
Using postgresql? Add it to your stack and be the first to know about CVEs like this one. (PostgreSQL)
Is PostgreSQL on your server exposed to the internet?
The free port scanner finds the open ports on your server and matches the service versions it can read against known vulnerabilities. No account needed.
Run a port scanVersions reported by the vendor
Affected version ranges reported by the assigning authority (redhat). Independent of NVD's CPE analysis and usually ahead of it.
Red Hat Red Hat Advanced Cluster Security 4.2
- 4.2.4-6 and laternot affected · rpm
- 4.2.4-6 and laternot affected · rpm
- 4.2.4-7 and laternot affected · rpm
- 4.2.4-6 and laternot affected · rpm
- 4.2.4-7 and laternot affected · rpm
Red Hat Red Hat Enterprise Linux 6
- all versionsunknown
Red Hat Red Hat Enterprise Linux 7
- all versionsaffected
Red Hat Red Hat Enterprise Linux 8
- 8090020231114113712.a75119d5 and laternot affected · rpm
- 8090020231128173330.a75119d5 and laternot affected · rpm
- 8090020231114113548.a75119d5 and laternot affected · rpm
- all versionsaffected
- all versionsunknown
Red Hat Red Hat Enterprise Linux 8.2 Advanced Update Support
- 8020020231128165246.4cda2c84 and laternot affected · rpm
Red Hat Red Hat Enterprise Linux 8.2 Telecommunications Update Service
- 8020020231128165246.4cda2c84 and laternot affected · rpm
Red Hat Red Hat Enterprise Linux 8.2 Update Services for SAP Solutions
- 8020020231128165246.4cda2c84 and laternot affected · rpm
Red Hat Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support
- 8040020231127153301.522a0ee4 and laternot affected · rpm
- 8040020231127154806.522a0ee4 and laternot affected · rpm
Red Hat Red Hat Enterprise Linux 8.4 Telecommunications Update Service
- 8040020231127153301.522a0ee4 and laternot affected · rpm
- 8040020231127154806.522a0ee4 and laternot affected · rpm
Red Hat Red Hat Enterprise Linux 8.4 Update Services for SAP Solutions
- 8040020231127153301.522a0ee4 and laternot affected · rpm
- 8040020231127154806.522a0ee4 and laternot affected · rpm
Red Hat Red Hat Enterprise Linux 8.6 Extended Update Support
- 8060020231114115246.ad008a3a and laternot affected · rpm
- 8060020231128165328.ad008a3a and laternot affected · rpm
Red Hat Red Hat Enterprise Linux 8.8 Extended Update Support
- 8080020231114105206.63b34585 and laternot affected · rpm
- 8080020231128165335.63b34585 and laternot affected · rpm
- 8080020231113134015.63b34585 and laternot affected · rpm
Affected versions · NVD (20)
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- postgresql postgresql11.0 and later · before 11.22
- postgresql postgresql12.0 and later · before 12.17
- postgresql postgresql13.0 and later · before 13.13
- postgresql postgresql14.0 and later · before 14.10
- postgresql postgresql15.0 and later · before 15.5
- postgresql postgresql16.0
- redhat codeready linux builder eus9.2
- redhat codeready linux builder eus for power little endian eus9.0_ppc64le
- redhat codeready linux builder eus for power little endian eus9.2_ppc64le
- redhat codeready linux builder for arm64 eus8.6_aarch64
- redhat codeready linux builder for arm64 eus9.0_aarch64
- redhat codeready linux builder for arm64 eus9.2_aarch64
- redhat codeready linux builder for ibm z systems eus9.0_s390x
- redhat codeready linux builder for ibm z systems eus9.2_s390x
- redhat codeready linux builder for power little endian eus9.0_ppc64le
- redhat codeready linux builder for power little endian eus9.2_ppc64le
- redhat enterprise linux8.0
- redhat enterprise linux9.0
- redhat enterprise linux eus8.6
- redhat enterprise linux eus8.8
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| AlmaLinux:8 | pg_repack | before 1.4.6-3.module_el8.6.0+3094+eb237fb8 | 1.4.6-3.module_el8.6.0+3094+eb237fb8 |
| AlmaLinux:8 | pg_repack | before 1.4.6-3.module_el8.6.0+3095+ee60d910 | 1.4.6-3.module_el8.6.0+3095+ee60d910 |
| AlmaLinux:8 | pg_repack | before 1.4.6-3.module_el8.6.0+2758+4f4474df | 1.4.6-3.module_el8.6.0+2758+4f4474df |
| AlmaLinux:8 | pg_repack | before 1.4.8-1.module_el8.8.0+3487+43ec1b9f | 1.4.8-1.module_el8.8.0+3487+43ec1b9f |
| AlmaLinux:8 | pg_repack | before 1.4.6-3.module_el8.6.0+2760+1746ec94 | 1.4.6-3.module_el8.6.0+2760+1746ec94 |
| AlmaLinux:8 | pgaudit | before 1.5.0-1.module_el8.6.0+3095+ee60d910 | 1.5.0-1.module_el8.6.0+3095+ee60d910 |
| AlmaLinux:8 | pgaudit | before 1.4.0-5.module_el8.6.0+3094+eb237fb8 | 1.4.0-5.module_el8.6.0+3094+eb237fb8 |
| AlmaLinux:8 | pgaudit | before 1.7.0-1.module_el8.8.0+3487+43ec1b9f | 1.7.0-1.module_el8.8.0+3487+43ec1b9f |
| AlmaLinux:8 | pgaudit | before 1.4.0-5.module_el8.6.0+2758+4f4474df | 1.4.0-5.module_el8.6.0+2758+4f4474df |
| AlmaLinux:8 | pgaudit | before 1.5.0-1.module_el8.6.0+2760+1746ec94 | 1.5.0-1.module_el8.6.0+2760+1746ec94 |
| AlmaLinux:8 | postgres-decoderbufs | before 0.10.0-2.module_el8.6.0+3095+ee60d910 | 0.10.0-2.module_el8.6.0+3095+ee60d910 |
| AlmaLinux:8 | postgres-decoderbufs | before 0.10.0-2.module_el8.6.0+3094+eb237fb8 | 0.10.0-2.module_el8.6.0+3094+eb237fb8 |
| AlmaLinux:8 | postgres-decoderbufs | before 1.9.7-1.Final.module_el8.8.0+3487+43ec1b9f | 1.9.7-1.Final.module_el8.8.0+3487+43ec1b9f |
| AlmaLinux:8 | postgres-decoderbufs | before 0.10.0-2.module_el8.6.0+2758+4f4474df | 0.10.0-2.module_el8.6.0+2758+4f4474df |
| AlmaLinux:8 | postgres-decoderbufs | before 0.10.0-2.module_el8.6.0+2760+1746ec94 | 0.10.0-2.module_el8.6.0+2760+1746ec94 |
| AlmaLinux:8 | postgresql | before 13.13-1.module_el8.9.0+3692+8714f643 | 13.13-1.module_el8.9.0+3692+8714f643 |
| AlmaLinux:8 | postgresql | before 15.5-1.module_el8.9.0+3706+885c732e | 15.5-1.module_el8.9.0+3706+885c732e |
| AlmaLinux:8 | postgresql | before 12.17-1.module_el8.9.0+3704+f1f917ce | 12.17-1.module_el8.9.0+3704+f1f917ce |
| AlmaLinux:8 | postgresql-contrib | before 12.17-1.module_el8.9.0+3704+f1f917ce | 12.17-1.module_el8.9.0+3704+f1f917ce |
| AlmaLinux:8 | postgresql-contrib | before 13.13-1.module_el8.9.0+3692+8714f643 | 13.13-1.module_el8.9.0+3692+8714f643 |
| AlmaLinux:8 | postgresql-contrib | before 15.5-1.module_el8.9.0+3706+885c732e | 15.5-1.module_el8.9.0+3706+885c732e |
| AlmaLinux:8 | postgresql-docs | before 12.17-1.module_el8.9.0+3704+f1f917ce | 12.17-1.module_el8.9.0+3704+f1f917ce |
| AlmaLinux:8 | postgresql-docs | before 13.13-1.module_el8.9.0+3692+8714f643 | 13.13-1.module_el8.9.0+3692+8714f643 |
| AlmaLinux:8 | postgresql-docs | before 15.5-1.module_el8.9.0+3706+885c732e | 15.5-1.module_el8.9.0+3706+885c732e |
+96
Same product
postgresql: all recordsOther highest-scoring records for the same primary product.
- CVE-2017-7546PostgreSQL versions before 9.2.22, 9.3.18, 9.4.13, 9.5.8 and 9.6.4 are vulnerable to incorrect authentication flaw allowing remote…57Plan
- CVE-2019-9193In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows superusers and users in the 'pg_execute_server_program' group to…55Plan
- CVE-2020-25695A flaw was found in PostgreSQL versions before 13.1, before 12.5, before 11.10, before 10.15, before 9.6.20 and before 9.5.24.49Plan
Published before and after this one in the same product
- ← EarlierCVE-2023-39418Aug 11, 2023 · Postgresql: merge fails to enforce update or select row security policies17Monitor
- ← EarlierCVE-2020-21469Aug 22, 2023 · An issue was discovered in PostgreSQL 12.2 allows attackers to cause a denial of service via repeatedly sending SIGHUP signals.17Monitor
- Later →CVE-2023-5869Dec 10, 2023 · Postgresql: buffer overrun from integer overflow in array modification36Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| almalinux:pg_repack | 1.4.6-3.module_el8.6.0+2760+1746ec94 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:pgaudit | 1.5.0-1.module_el8.6.0+2760+1746ec94 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:postgres-decoderbufs | 0.10.0-2.module_el8.6.0+2760+1746ec94 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:postgresql | 13.13-1.module_el8.9.0+3692+8714f643 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:postgresql-contrib | 13.13-1.module_el8.9.0+3692+8714f643 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:postgresql-docs | 13.13-1.module_el8.9.0+3692+8714f643 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:postgresql-plperl | 13.13-1.module_el8.9.0+3692+8714f643 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:postgresql-plpython3 | 13.13-1.module_el8.9.0+3692+8714f643 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:postgresql-pltcl | 13.13-1.module_el8.9.0+3692+8714f643 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:postgresql-server | 13.13-1.module_el8.9.0+3692+8714f643 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:postgresql-server-devel | 13.13-1.module_el8.9.0+3692+8714f643 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:postgresql-static | 13.13-1.module_el8.9.0+3692+8714f643 · AlmaLinux:8 | Package registry (OSV) |
| alpine:postgresql12 | 12.17-r0 · Alpine:v3.15 | Package registry (OSV) |
| alpine:postgresql14 | 14.10-r0 · Alpine:v3.15 | Package registry (OSV) |
| alpine:postgresql15 | 15.5-r0 · Alpine:v3.17 | Package registry (OSV) |
| alpine:postgresql16 | 16.1-r0 · Alpine:v3.19 | Package registry (OSV) |
| debian:postgresql-11 | 11.22-0+deb10u1 · Debian:10 | Package registry (OSV) |
| debian:postgresql-13 | 13.13-0+deb11u1 · Debian:11 | Package registry (OSV) |
| debian:postgresql-15 | 15.5-0+deb12u1 · Debian:12 | Package registry (OSV) |
| opensuse:postgresql | 16-150400.4.9.2 · openSUSE:Leap 15.4 | Package registry (OSV) |
| opensuse:postgresql11 | 11.22-1.1 · openSUSE:Tumbleweed | Package registry (OSV) |
| opensuse:postgresql12 | 12.17-150200.8.54.1 · openSUSE:Leap 15.4 | Package registry (OSV) |
| opensuse:postgresql13 | 13.13-150200.5.50.1 · openSUSE:Leap 15.4 | Package registry (OSV) |
| opensuse:postgresql14 | 14.10-150200.5.36.1 · openSUSE:Leap 15.4 | Package registry (OSV) |
| opensuse:postgresql15 | 15.5-150200.5.19.1 · openSUSE:Leap 15.4 | Package registry (OSV) |
| opensuse:postgresql16 | 16.1-150200.5.7.1 · openSUSE:Leap 15.4 | Package registry (OSV) |
| opensuse:postgresql16-mini | 16.1-150200.5.7.1 · openSUSE:Leap 15.4 | Package registry (OSV) |
| opensuse:postgresql17 | 17.6-2.1 · openSUSE:Tumbleweed | Package registry (OSV) |
| red hat:postgresql | 0:13.13-1.el9_0 · Red Hat:rhel_eus:9.0::appstream | Package registry (OSV) |
| red hat:postgresql-contrib | 0:13.13-1.el9_0 · Red Hat:rhel_eus:9.0::appstream | Package registry (OSV) |
+26
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
Not on record for this CVE: EPSS history · patch commit or PR link · variant or chain candidate · public bounty program.
Technical details
Attack conditions
- Anyone who can reach it over the internet can trigger it.
- A low-privileged account is enough.
- No user action is required.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- low · data can be read
- Integrity
- none
- Availability
- none
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality impact
- Low
- Integrity impact
- None
- Availability impact
- None
Weakness class (CWE)
CWE-686 · Function Call With Incorrect Argument TypeCVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
nvd-primary
Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
MITRE has no CAPEC/ATT&CK mapping for this CWE.
Change log (1)
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (19 more)Show less
- access.redhat.com/errata/RHSA-2023:7579
- access.redhat.com/errata/RHSA-2023:7580
- access.redhat.com/errata/RHSA-2023:7581
- access.redhat.com/errata/RHSA-2023:7616
- access.redhat.com/errata/RHSA-2023:7656
- access.redhat.com/errata/RHSA-2023:7666
- access.redhat.com/errata/RHSA-2023:7667
- access.redhat.com/errata/RHSA-2023:7694
- access.redhat.com/errata/RHSA-2023:7695
- access.redhat.com/errata/RHSA-2023:7714
- access.redhat.com/errata/RHSA-2023:7770
- access.redhat.com/errata/RHSA-2023:7772
- access.redhat.com/errata/RHSA-2023:7784
- access.redhat.com/errata/RHSA-2023:7785
- access.redhat.com/errata/RHSA-2023:7883
- access.redhat.com/errata/RHSA-2023:7884
- access.redhat.com/errata/RHSA-2023:7885
- access.redhat.com/errata/RHSA-2024:0304
- access.redhat.com/errata/RHSA-2024:0332
Vendor advisories and official records. Exploit/PoC links are deliberately left out.