CVE-2025-12818 json
PostgreSQL libpq undersizes allocations, via integer wraparound
published 2025-11-13 11 mo ago modified 2026-10-19 20 d ago also BIT-postgresql-2025-12818 , EUVD-2025-169291
- cvss
- 5.9
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.4%
- EPSS 0.4% chance of exploitation in 30 days, percentile 30%
- public exploits
- 0
- none known
Summary
Integer wraparound in multiple PostgreSQL libpq client library functions allows an application input provider or network peer to cause libpq to undersize an allocation and write out-of-bounds by hundreds of megabytes. This results in a segmentation fault for the application using libpq. Versions before PostgreSQL 18.1, 17.7, 16.11, 15.15, 14.20, and 13.23 are affected.
Patch / fix
- bitnami postgresql 13.23.0, 14.20.0, 15.15.0, 16.11.0, 17.7.0, 18.1.0
- n/a PostgreSQL 13.23, 14.20, 15.15, 16.11, 17.7, 18.1
- postgresql-15 Debian 12 15.15-0+deb12u1
- postgresql-17 Debian 13 17.7-0+deb13u1
- postgresql-18 Debian 14 18.1-1
debian advisories DEBIAN-CVE-2025-12818
- postgresql-14 Ubuntu 22.04 LTS 14.20-0ubuntu0.22.04.1
- postgresql-16 Ubuntu 24.04 LTS 16.11-0ubuntu0.24.04.1
- postgresql-17 Ubuntu 25.10 17.7-0ubuntu0.25.10.1
- postgresql-18 Ubuntu 26.04 LTS 18.1-1ubuntu1
ubuntu advisories UBUNTU-CVE-2025-12818
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- postgresql18 hummingbird 1 18.3-1.2.hum1
- libpq RHEL 8 13.23-1.el8_10
- libpq RHEL 10.1 16.11-3.el10_1
- postgresql16 RHEL 10.1 16.11-1.el10_1
- postgresql RHEL 10.1 16.11-1.el10_1
- postgresql-test RHEL 10.1 16.11-1.el10_1
- postgresql-pltcl RHEL 10.1 16.11-1.el10_1
- postgresql-plperl RHEL 10.1 16.11-1.el10_1
red hat advisories RHSA-2026:8756RHSA-2026:0865RHSA-2026:0835RHSA-2026:0746RHSA-2026:0744RHSA-2026:0745
- postgresql13 SLES for SAP applications 16.0, SLES 16.0 13.23-160000.1.1
- postgresql17 SLES for SAP applications 16.0, SLES 16.0 17.7-160000.1.1
- postgresql18 SLES for SAP applications 16.0, SLES 16.0 18.1-160000.1.2
- postgresql SLES for SAP applications 16.0, SLES 16.0 18-160000.1.1
- postgresql13-pgaudit SLES for SAP applications 16.0, SLES 16.0 1.5.3-160000.3.1
- postgresql14-pgaudit SLES for SAP applications 16.0, SLES 16.0 1.6.3-160000.3.1
- postgresql15-pgaudit SLES for SAP applications 16.0, SLES 16.0 1.7.1-160000.3.1
- postgresql16-pgaudit SLES for SAP applications 16.0, SLES 16.0 16.1-160000.3.1
suse advisories SUSE-SU-2026:20986-1SUSE-SU-2026:20194-1SUSE-SU-2026:20588-1SUSE-SU-2026:20587-1SUSE-SU-2026:20193-1SUSE-SU-2026:0197-1
- postgresql13 openSUSE Leap 16.0 13.23-160000.1.1
- postgresql17 openSUSE Leap 16.0 17.7-160000.1.1
- postgresql18 openSUSE Leap 16.0 18.1-160000.1.2
- postgresql openSUSE Leap 16.0 18-160000.1.1
- postgresql18-mini openSUSE Leap 16.0 18.1-160000.1.1
- postgresql13-pgaudit openSUSE Leap 16.0 1.5.3-160000.3.1
- postgresql14-pgaudit openSUSE Leap 16.0 1.6.3-160000.3.1
- postgresql15-pgaudit openSUSE Leap 16.0 1.7.1-160000.3.1
opensuse advisories openSUSE-SU-2026:20449-1openSUSE-SU-2026:20131-1openSUSE-SU-2026:20266-1openSUSE-SU-2026:20265-1openSUSE-SU-2026:20130-1openSUSE-SU-2025:15789-1
- libpq AlmaLinux 8 13.23-1.el8_10
- libpq AlmaLinux 10 16.11-3.el10_1
- postgresql AlmaLinux 9 13.23-1.el9_7
- postgresql-test AlmaLinux 9 13.23-1.el9_7
- postgresql-pltcl AlmaLinux 9 13.23-1.el9_7
- postgresql-plperl AlmaLinux 9 13.23-1.el9_7
- postgresql-server AlmaLinux 9 13.23-1.el9_7
- postgresql-contrib AlmaLinux 9 13.23-1.el9_7
almalinux advisories ALSA-2026:0695ALSA-2026:0594ALSA-2026:0491ALSA-2026:0492ALSA-2026:0493ALSA-2026:0519
- libpq Rocky Linux 8 13.23-1.el8_10
- libpq Rocky Linux 10 16.11-3.el10_1
- postgresql16 Rocky Linux 10 16.11-1.el10_1
- libpq Rocky Linux 9 13.23-1.el9_7
- postgresql Rocky Linux 9 13.23-1.el9_7
- pgaudit Rocky Linux 9 1.7.0-1.module+el9.7.0+40011+28af63c9
- pg_repack Rocky Linux 9 1.4.8-2.module+el9.7.0+40011+28af63c9
- postgresql Rocky Linux 9 15.15-2.module+el9.7.0+40058+d9f04599
rocky linux advisories RLSA-2026:0695RLSA-2026:0594RLSA-2026:0525RLSA-2026:0458RLSA-2026:0491RLSA-2026:0492
- postgresql15 Alpine 3.22, Alpine 3.20, Alpine 3.19 15.15-r0
- postgresql16 Alpine 3.24, Alpine 3.23, Alpine 3.22 +3 more 16.11-r0
- postgresql17 Alpine 3.24, Alpine 3.23, Alpine 3.22 +1 more 17.7-r0
- postgresql18 Alpine 3.24, Alpine 3.23 18.1-r0
alpine advisories ALPINE-CVE-2025-12818
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- postgresql Azure Linux 3.0 16.11-1
- postgresql CBL-Mariner 2.0 14.20-1
- rust Azure Linux 3.0 1.90.0-4
azure linux advisories AZL-70166AZL-70202AZL-74900
Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2025-12818 updated cvss 7.5
postgresql: libpq: libpq undersizes allocations, via integer wraparound
-
Red Hat Enterprise Linux 6 postgresql, postgresql-libs, postgresql-test, postgresql-pltcl, postgresql-plperl, postgresql-server, +2 moreaffected: workaround, no fix planned “No mitigation is currently available that meets Red Hat Product Security’s standards for usability, deployment, applicability, or stability.”
-
Red Hat CodeReady Linux Builder EUS (v.9.4) postgresql-test 13.23-1.el9_4fixed: vendor fix “No mitigation is currently available that meets Red Hat Product Security’s standards for usability, deployment, applicability, or stability.” RHSA-2026:0262
-
Red Hat CodeReady Linux Builder EUS (v.9.6) postgresql-test 13.23-1.el9_6, postgresql-test-rpm-macros 13.23-1.el9_6fixed: vendor fix “No mitigation is currently available that meets Red Hat Product Security’s standards for usability, deployment, applicability, or stability.” RHSA-2026:0268
-
Red Hat Discovery 2 discovery 1769104765fixed: vendor fix “No mitigation is currently available that meets Red Hat Product Security’s standards for usability, deployment, applicability, or stability.” RHSA-2026:1736
-
Red Hat Enterprise Linux AppStream (v. 8) libpq 13.23-1.el8_10, pgaudit 1.5.0-1.module+el8.9.0+20664+9c30cf7f, pgaudit 1.7.0-1.module+el8.9.0+19797+c4ce5969, pgaudit 16.0-1.module+el8.10.0+20413+d8116364, pg_repack 1.4.6-3.module+el8.9.0+20664+9c30cf7f, pg_repack 1.4.8-1.module+el8.9.0+19797+c4ce5969, +33 morefixed: vendor fix “No mitigation is currently available that meets Red Hat Product Security’s standards for usability, deployment, applicability, or stability.” RHSA-2026:0695
-
Red Hat Enterprise Linux AppStream (v. 9) libpq 13.23-1.el9_7, postgresql 13.23-1.el9_7, postgresql-pltcl 13.23-1.el9_7, postgresql-plperl 13.23-1.el9_7, postgresql-server 13.23-1.el9_7, postgresql-contrib 13.23-1.el9_7, +34 morefixed: vendor fix “No mitigation is currently available that meets Red Hat Product Security’s standards for usability, deployment, applicability, or stability.” RHSA-2026:0458
-
Red Hat Enterprise Linux AppStream (v. 10) postgresql 16.11-1.el10_1, postgresql16 16.11-1.el10_1, postgresql-test 16.11-1.el10_1, postgresql-pltcl 16.11-1.el10_1, postgresql-plperl 16.11-1.el10_1, postgresql-server 16.11-1.el10_1, +4 morefixed: vendor fix “No mitigation is currently available that meets Red Hat Product Security’s standards for usability, deployment, applicability, or stability.” RHSA-2026:0594
-
Red Hat Enterprise Linux AppStream AUS (v. 8.2) libpq 12.7-1.el8_2.3fixed: vendor fix “No mitigation is currently available that meets Red Hat Product Security’s standards for usability, deployment, applicability, or stability.” RHSA-2026:0835
show 18 moreshow fewer
-
Red Hat Enterprise Linux AppStream AUS (v.8.4) libpq 13.23-1.el8_4, pgaudit 1.5.0-1.module+el8.4.0+8873+b821c30a, postgresql 13.23-1.module+el8.4.0+23703+6d959a24, postgresql-test 13.23-1.module+el8.4.0+23703+6d959a24, postgresql-pltcl 13.23-1.module+el8.4.0+23703+6d959a24, postgresql-plperl 13.23-1.module+el8.4.0+23703+6d959a24, +6 morefixed: vendor fix “No mitigation is currently available that meets Red Hat Product Security’s standards for usability, deployment, applicability, or stability.” RHSA-2026:0744
-
Red Hat Enterprise Linux AppStream AUS (v.8.6) libpq 13.23-1.el8_6, pgaudit 1.5.0-1.module+el8.4.0+8873+b821c30a, pg_repack 1.4.6-3.module+el8.5.0+11357+bcc62552, postgresql 13.23-1.module+el8.6.0+23699+53a3def3.1, postgresql-test 13.23-1.module+el8.6.0+23699+53a3def3.1, postgresql-pltcl 13.23-1.module+el8.6.0+23699+53a3def3.1, +7 more Red Hat Enterprise Linux AppStream E4S (v.8.6) libpq 13.23-1.el8_6, pgaudit 1.5.0-1.module+el8.4.0+8873+b821c30a, pg_repack 1.4.6-3.module+el8.5.0+11357+bcc62552, postgresql 13.23-1.module+el8.6.0+23699+53a3def3.1, postgresql-test 13.23-1.module+el8.6.0+23699+53a3def3.1, postgresql-pltcl 13.23-1.module+el8.6.0+23699+53a3def3.1, +7 morefixed: vendor fix “No mitigation is currently available that meets Red Hat Product Security’s standards for usability, deployment, applicability, or stability.” RHSA-2025:23158
-
Red Hat Enterprise Linux AppStream E4S (v.8.8) libpq 13.23-1.el8_8, pgaudit 1.5.0-1.module+el8.4.0+8873+b821c30a, pgaudit 1.7.0-1.module+el8.8.0+17071+aaaceaa4, pg_repack 1.4.6-3.module+el8.5.0+11357+bcc62552, pg_repack 1.4.8-1.module+el8.8.0+17071+aaaceaa4, postgresql 13.23-1.module+el8.8.0+23794+2d67ab3c, +20 morefixed: vendor fix “No mitigation is currently available that meets Red Hat Product Security’s standards for usability, deployment, applicability, or stability.” RHSA-2025:23157
-
Red Hat Enterprise Linux AppStream E4S (v.9.0) libpq 13.23-1.el9_0, postgresql 13.23-1.el9_0, postgresql-pltcl 13.23-1.el9_0, postgresql-plperl 13.23-1.el9_0, postgresql-server 13.23-1.el9_0, postgresql-contrib 13.23-1.el9_0, +3 morefixed: vendor fix “No mitigation is currently available that meets Red Hat Product Security’s standards for usability, deployment, applicability, or stability.” RHSA-2025:23124
-
Red Hat Enterprise Linux AppStream E4S (v.9.2) libpq 13.23-1.el9_2, postgresql 13.23-1.el9_2, postgresql-pltcl 13.23-1.el9_2, postgresql-plperl 13.23-1.el9_2, postgresql-server 13.23-1.el9_2, postgresql-contrib 13.23-1.el9_2, +16 morefixed: vendor fix “No mitigation is currently available that meets Red Hat Product Security’s standards for usability, deployment, applicability, or stability.” RHSA-2026:0746
-
Red Hat Enterprise Linux AppStream EUS (v. 10.0) postgresql 16.11-1.el10_0, postgresql16 16.11-1.el10_0, postgresql-test 16.11-1.el10_0, postgresql-pltcl 16.11-1.el10_0, postgresql-plperl 16.11-1.el10_0, postgresql-server 16.11-1.el10_0, +4 morefixed: vendor fix “No mitigation is currently available that meets Red Hat Product Security’s standards for usability, deployment, applicability, or stability.” RHSA-2026:0865
-
Red Hat Enterprise Linux AppStream EUS (v.9.4) libpq 13.23-1.el9_4, postgresql 13.23-1.el9_4, postgresql-pltcl 13.23-1.el9_4, postgresql-plperl 13.23-1.el9_4, postgresql-server 13.23-1.el9_4, postgresql-contrib 13.23-1.el9_4, +29 morefixed: vendor fix “No mitigation is currently available that meets Red Hat Product Security’s standards for usability, deployment, applicability, or stability.” RHSA-2025:23123
-
Red Hat Enterprise Linux AppStream EUS (v.9.6) libpq 13.23-1.el9_6, postgresql 13.23-1.el9_6, postgresql-pltcl 13.23-1.el9_6, postgresql-plperl 13.23-1.el9_6, postgresql-server 13.23-1.el9_6, postgresql-contrib 13.23-1.el9_6, +30 morefixed: vendor fix “No mitigation is currently available that meets Red Hat Product Security’s standards for usability, deployment, applicability, or stability.” RHSA-2026:0745
-
Red Hat Enterprise Linux AppStream EUS EXTENSION (v.8.4) libpq 13.23-1.el8_4, pgaudit 1.5.0-1.module+el8.4.0+8873+b821c30a, postgresql 13.23-1.module+el8.4.0+23703+6d959a24, postgresql-test 13.23-1.module+el8.4.0+23703+6d959a24, postgresql-pltcl 13.23-1.module+el8.4.0+23703+6d959a24, postgresql-plperl 13.23-1.module+el8.4.0+23703+6d959a24, +6 morefixed: vendor fix “No mitigation is currently available that meets Red Hat Product Security’s standards for usability, deployment, applicability, or stability.” RHSA-2026:0744
-
Red Hat Enterprise Linux AppStream TUS (v.8.6) libpq 13.23-1.el8_6, pgaudit 1.5.0-1.module+el8.4.0+8873+b821c30a, pg_repack 1.4.6-3.module+el8.5.0+11357+bcc62552, postgresql 13.23-1.module+el8.6.0+23699+53a3def3.1, postgresql-test 13.23-1.module+el8.6.0+23699+53a3def3.1, postgresql-pltcl 13.23-1.module+el8.6.0+23699+53a3def3.1, +7 morefixed: vendor fix “No mitigation is currently available that meets Red Hat Product Security’s standards for usability, deployment, applicability, or stability.” RHSA-2025:23158
-
Red Hat Enterprise Linux AppStream TUS (v.8.8) libpq 13.23-1.el8_8, pgaudit 1.5.0-1.module+el8.4.0+8873+b821c30a, pgaudit 1.7.0-1.module+el8.8.0+17071+aaaceaa4, pg_repack 1.4.6-3.module+el8.5.0+11357+bcc62552, pg_repack 1.4.8-1.module+el8.8.0+17071+aaaceaa4, postgresql 13.23-1.module+el8.8.0+23794+2d67ab3c, +20 morefixed: vendor fix “No mitigation is currently available that meets Red Hat Product Security’s standards for usability, deployment, applicability, or stability.” RHSA-2025:23157
-
Red Hat Enterprise Linux BaseOS (v. 10) libpq 16.11-3.el10_1fixed: vendor fix “No mitigation is currently available that meets Red Hat Product Security’s standards for usability, deployment, applicability, or stability.” RHSA-2026:0594
-
Red Hat Enterprise Linux BaseOS EUS (v. 10.0) libpq 16.11-1.el10_0fixed: vendor fix “No mitigation is currently available that meets Red Hat Product Security’s standards for usability, deployment, applicability, or stability.” RHSA-2026:0865
-
Red Hat Enterprise Linux CodeReady Linux Builder (v. 9) postgresql-test 13.23-1.el9_7, postgresql-test-rpm-macros 13.23-1.el9_7fixed: vendor fix “No mitigation is currently available that meets Red Hat Product Security’s standards for usability, deployment, applicability, or stability.” RHSA-2026:0491
-
Red Hat Enterprise Linux CodeReady Linux Builder (v. 10) postgresql-test-rpm-macros 16.11-1.el10_1fixed: vendor fix “No mitigation is currently available that meets Red Hat Product Security’s standards for usability, deployment, applicability, or stability.” RHSA-2026:0525
-
Red Hat Enterprise Linux CodeReady Linux Builder EUS (v. 10.0) postgresql-test-rpm-macros 16.11-1.el10_0fixed: vendor fix “No mitigation is currently available that meets Red Hat Product Security’s standards for usability, deployment, applicability, or stability.” RHSA-2026:0456
-
Red Hat Hardened Images postgresql18 18.3-1.2.hum1fixed: vendor fix “No mitigation is currently available that meets Red Hat Product Security’s standards for usability, deployment, applicability, or stability.” RHSA-2026:8756
-
Red Hat Discovery 2 discovery 1769111774 Red Hat Enterprise Linux 7 postgresql, postgresql-libs, postgresql-test, postgresql-pltcl, postgresql-plperl, postgresql-server, +3 more Red Hat Enterprise Linux 8 pgaudit, pg_repack, postgresql, postgresql-test, postgresql-pltcl, postgresql-plperl, +7 more Red Hat Hardened Images postgresql 18.3-1.2.hum1, postgresql-test 18.3-1.2.hum1, postgresql-plperl 18.3-1.2.hum1, postgresql-server 18.3-1.2.hum1, postgresql-contrib 18.3-1.2.hum1, postgresql-upgrade 18.3-1.2.hum1, +3 morenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 11 mo ago
Exploit prediction
0.36% chance of exploitation in the next 30 days, higher than 30% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H |
| OSV | 3.1 | 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| bitnami | postgresql | <13.23.0 >=14.0.0, <14.20.0 >=15.0.0, <15.15.0 >=16.0.0, <16.11.0 >=17.0.0, <17.7.0 >=18.0.0, <18.1.0 |
13.23.0 14.20.0 15.15.0 16.11.0 17.7.0 18.1.0 |
Affected products
- n/a PostgreSQL
Classification
- Weakness
-
- CWE-190 Integer Overflow or Wraparound
- Technology feeds
References
Sources
- CVE List CVE-2025-12818
- NVD CVE-2025-12818
- OSV BIT-postgresql-2025-12818
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.