CVE-2025-12818

PostgreSQL libpq undersizes allocations, via integer wraparound

State
Published
Severity
5.9 Medium
Published
Nov 13, 2025
Updated
Nov 13, 2025
Reserved
Nov 6, 2025

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
3.15.9 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:HPostgreSQL

Weaknesses

  • CWE-190 Integer Overflow or Wraparound

Affected Products

ProductVersions
PostgreSQLn/a
  • 18 to before 18.1Affected
  • 17 to before 17.7Affected
  • 16 to before 16.11Affected
  • 15 to before 15.15Affected
  • 14 to before 14.20Affected
  • before 13.23Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.