Buffer overflow in PostgreSQL
CVE-2026-2005
Heap buffer overflow in PostgreSQL pgcrypto allows a ciphertext provider to execute arbitrary code as the operating system user running the database. Versions before PostgreSQL 18.2, 17.8, 16.12, 15.16, and 14.21 are affected.
Vulnerability class: Buffer Overflow
Published · last modified .
CVSS v3 metric
CVSS v3 base score 8.8 (High). Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
EPSS exploit prediction
EPSS 0.014, 72.0th percentile (scored ); unchanged over 30 days. About EPSS.
Affected products
- PostgreSQL
- PostgreSQL — versions 18, 17, 16
Weakness classification (CWE)
Public exploits and proof-of-concept code
5 public repositories with exploit or proof-of-concept code for this CVE:
- var77/CVE-2026-2005 (27 stars, last pushed 2026-05-13): PoC for CVE-2026-2005
- dinosn/cve-2026-2005 (18 stars, last pushed 2026-05-05): CVE-2026-2005 — PostgreSQL pgcrypto heap overflow RCE exploit
- open-flaw/CVE-2026-2005 (last pushed 2026-08-21)
- stvm8/CVE-2026-2005_lab (last pushed 2026-05-04)
- M3str3/CVE-2026-2005 (last pushed 2026-03-07): PoC for CVE-2026-2005 — heap buffer overflow in PostgreSQL pgcrypto (pgp_pub_decrypt). Oversized PGP session key bypasses bounds check in pgp-pubdec.c. Affects < 17.8 / 16.12 / 15.16 / 14.21 / 18.2.
References
- www.postgresql.org/support/security/CVE-2026-2005/ (Vendor Advisory)
- access.redhat.com/errata/RHSA-2026:19009
- access.redhat.com/errata/RHSA-2026:19010
- access.redhat.com/errata/RHSA-2026:3730
- access.redhat.com/errata/RHSA-2026:3887
- access.redhat.com/errata/RHSA-2026:3896
- access.redhat.com/errata/RHSA-2026:4024
- access.redhat.com/errata/RHSA-2026:4059
- access.redhat.com/errata/RHSA-2026:4063
- access.redhat.com/errata/RHSA-2026:4064
This CVE has public exploit evidence. See the latest CVEs with public exploits.