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

- Severity: Medium 5.9 (CVSS:3.1, scored by PostgreSQL) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.36%, higher than 32% of CVEs (2026-12-01)
- Published: 2025-11-13T13:00:12.911Z
- Modified: 2026-10-19T13:10:00.110Z
- Also known as: BIT-POSTGRESQL-2025-12818
- Weaknesses: CWE-190
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: PostgreSQL

## 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.

(As written by CVE List.)

## Affected

- 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
- postgresql (Bitnami): before 13.23.0; from 14.0.0 before 14.20.0; from 15.0.0 before 15.15.0; from 16.0.0 before 16.11.0; from 17.0.0 before 17.7.0; from 18.0.0 before 18.1.0

## Every score

- PostgreSQL: CVSS:3.1 5.9 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Bitnami Vulnerability Database: rating Medium

## References

- <https://www.postgresql.org/support/security/CVE-2025-12818/> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-12818> (web)

## Sources

- CVE List: [CVE-2025-12818](https://www.cve.org/CVERecord?id=CVE-2025-12818), CVE Terms of Use, modified 2025-11-13
- NVD: [CVE-2025-12818](https://nvd.nist.gov/vuln/detail/CVE-2025-12818), Public domain, modified 2026-10-19
- Bitnami Vulnerability Database: [BIT-POSTGRESQL-2025-12818](https://osv.dev/vulnerability/BIT-POSTGRESQL-2025-12818), Apache-2.0, modified 2025-11-21

---

Page: https://cve.day/CVE-2025-12818 · Whole record: https://cve.day/CVE-2025-12818.json · Rebuilt by cve.day 2026-11-25T22:59:07.624Z
