5.9

CVE-2025-12818: PostgreSQL libpq undersizes allocations, via integer wraparound

Deferred
AliasesALPINE-CVE-2025-12818RHSA-2025:23123RHSA-2025:23124
Published 13-11-2025Last modified 13-11-2025

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.

Priority
Routine

Not severe (CVSS 5.9, network access); no exploitation reported by the 5 checked sources

Source freshness unavailable

How is this decided?
CVSS score
5.9/10
010
Medium · v3.1 (CVE.org)
EPSS score
0.36%
0%100%
Low · +0.02 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits0No public exploits recorded

Advisory lineage

Upstream 0 · Downstream 56 · Related 32

Timeline

  1. 13-11-2025
    PublishedVulnerability first disclosed.
  2. 13-11-2025
    Last 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

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

04-10-202603-11-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected systems

Version check

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

References

34 links
Show all 34 references