CVE-2025-12818

PostgreSQL libpq undersizes allocations, via integer wraparound

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.

The PostgreSQL project thanks Aleksey Solovev (Positive Technologies) for reporting this problem.

Version Information

Affected Version Fixed In Fix Published
18 18.1 Nov. 13, 2025
17 17.7 Nov. 13, 2025
16 16.11 Nov. 13, 2025
15 15.15 Nov. 13, 2025
14 14.20 Nov. 13, 2025
13 13.23 Nov. 13, 2025

For more information about PostgreSQL versioning, please visit the versioning page.

CVSS 3.0

Overall Score 5.9
Component client
Vector AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H

Reporting Security Vulnerabilities

If you wish to report a new security vulnerability in PostgreSQL, please send an email to security@postgresql.org.

For reporting non-security bugs, please see the Report a Bug page.