What’s Vulnerable › Vulnerabilities
CVE-2025-12818: PostgreSQL libpq undersizes allocations, via integer wraparound
- Severity: medium (CVSS 5.9 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.4% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2025-11-13 · updated 2026-10-19
- Weakness: CWE-190
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.
Affected products
- PostgreSQL: from 18 before 18.1; from 17 before 17.7; from 16 before 16.11; from 15 before 15.15; from 14 before 14.20; before 13.23 — fixed in 13.23, 14.20, 15.15, 16.11, 17.7, 18.1
How to fix
Upgrade to a fixed version: PostgreSQL 13.23, 14.20, 15.15, 16.11. Check the vendor advisory for mitigations.
References
Get alerted when CVE-2025-12818 or the next vulnerability affects your stack