CVE-2025-12818

published 13 Nov 2025 · updated 16 Nov 2026

PostgreSQL libpq undersizes allocations, via integer wraparound

5.9MediumCVSS 5.9EPSS 0%

No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in 13.23, 14.20, 15.15 and 3 more.

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.

Affected

Vendors, products and packages with version ranges

VendorProductVersionsFixed
<13.23, >=14 <14.20, >=15 <15.15, >=16 <16.11, >=17 <17.7, >=18 <18.113.23, 14.20, 15.15, 16.11, 17.7, 18.1

Timeline

Every event on this vulnerability

Embed

A live severity badge for an advisory, README or ticket

CVE-2025-12818 severity on Zeptric[![CVE-2025-12818](https://zeptric.io/badge/cve/CVE-2025-12818.svg)](https://zeptric.io/cve/CVE-2025-12818)