CVE-2025-12818: PostgreSQL libpq undersizes allocations, via integer wraparound
Vulnerability summary
CVE-2025-12818 is a medium (CVSS 5.9) Integer Overflow or Wraparound vulnerability in postgresql-17. EPSS estimates a 0.36% chance of exploitation in the next 30 days, higher than 30.2% of scored vulnerabilities.
Not severe (CVSS 5.9, network access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 56 · Related 32Timeline
- 13-11-2025PublishedVulnerability first disclosed.
- 13-11-2025Last modifiedVulnerability information updated.
Description
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.
CVSS metrics
6 scores · 6 sources · 1 version- OSV · AlpineEcosystem advisory · calculated5.9MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
- OSV · Red hatEcosystem advisory · calculated7.5HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HDiffers
- OSV · UbuntuEcosystem advisory · calculated5.9MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
- OSV · DebianEcosystem advisory · calculated5.9MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
- NVDNIST5.9MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS trend
Probability
0.36%
Chance of exploitation in the next 30 days
Percentile
30%
Versus all other CVEs
30-day change
Increase +0.02 pp
From 0.34% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.
Ubuntu8 products
- postgresql-10All versions (No fix recorded)
- postgresql-12All versions (No fix recorded)
- postgresql-14< 14.20-0ubuntu0.22.04.1
- postgresql-16< 16.11-0ubuntu0.24.04.1
- postgresql-17< 17.7-0ubuntu0.25.10.1
Redhat5 products
- libpq< 0:16.11-3.el10_1 | < 0:13.23-1.el8_10 | < 0:13.23-1.el8_4 | < 0:13.23-1.el9_6 | < 0:13.23-1.el9_2 | < 0:12.7-1.el8_2.3 | < 0:16.11-1.el10_0 | < 0:13.23-1.el9_4 | < 0:13.23-1.el9_0 | < 0:13.23-1.el8_8 | < 0:13.23-1.el8_6 | < 0:13.23-1.el9_7
- libpq-debuginfo< 0:16.11-3.el10_1 | < 0:13.23-1.el8_10 | < 0:13.23-1.el8_4 | < 0:13.23-1.el9_6 | < 0:13.23-1.el9_2 | < 0:12.7-1.el8_2.3 | < 0:16.11-1.el10_0 | < 0:13.23-1.el9_4 | < 0:13.23-1.el9_0 | < 0:13.23-1.el8_8 | < 0:13.23-1.el8_6 | < 0:13.23-1.el9_7
- libpq-debugsource< 0:16.11-3.el10_1 | < 0:13.23-1.el8_10 | < 0:13.23-1.el8_4 | < 0:13.23-1.el9_6 | < 0:13.23-1.el9_2 | < 0:12.7-1.el8_2.3 | < 0:16.11-1.el10_0 | < 0:13.23-1.el9_4 | < 0:13.23-1.el9_0 | < 0:13.23-1.el8_8 | < 0:13.23-1.el8_6 | < 0:13.23-1.el9_7
- libpq-devel< 0:16.11-3.el10_1 | < 0:13.23-1.el8_10 | < 0:13.23-1.el8_4 | < 0:13.23-1.el9_6 | < 0:13.23-1.el9_2 | < 0:12.7-1.el8_2.3 | < 0:16.11-1.el10_0 | < 0:13.23-1.el9_4 | < 0:13.23-1.el9_0 | < 0:13.23-1.el8_8 | < 0:13.23-1.el8_6 | < 0:13.23-1.el9_7
- libpq-devel-debuginfo< 0:16.11-3.el10_1 | < 0:13.23-1.el8_10 | < 0:13.23-1.el8_4 | < 0:13.23-1.el9_6 | < 0:13.23-1.el9_2 | < 0:12.7-1.el8_2.3 | < 0:16.11-1.el10_0 | < 0:13.23-1.el9_4 | < 0:13.23-1.el9_0 | < 0:13.23-1.el8_8 | < 0:13.23-1.el8_6 | < 0:13.23-1.el9_7
Alpine4 products
- postgresql15< 15.15-r0
- postgresql16< 16.11-r0
- postgresql17< 17.7-r0
- postgresql18< 18.1-r0
Debian3 products
- postgresql-15< 15.15-0+deb12u1
- postgresql-17< 17.7-0+deb13u1
- postgresql-18< 18.1-1
4 vendors · 20 products