CVE-2026-6477
PostgreSQL libpq lo_* functions let server superuser overwrite client stack memory
Description
Use of inherently dangerous function PQfn(..., result_is_int=0, ...) in PostgreSQL libpq lo_export(), lo_read(), lo_lseek64(), and lo_tell64() functions allows the server superuser to overwrite a client stack buffer with an arbitrarily-large response. Like gets(), PQfn(..., result_is_int=0, ...) stores arbitrary-length, server-determined data into a buffer of unspecified size. Because both the \lo_export command in psql and pg_dump call lo_read(), the server superuser can overwrite pg_dump or psql stack memory. Versions before PostgreSQL 18.4, 17.10, 16.14, 15.18, and 14.23 are affected.
INFO
Published Date :
May 14, 2026, 2:16 p.m.
Last Modified :
May 18, 2026, 3:03 p.m.
Remotely Exploit :
No
Source :
f86ef6dc-4d3a-42ad-8f28-e6d5547a5007
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
|---|---|---|---|---|---|---|
| CVSS 3.1 | HIGH | f86ef6dc-4d3a-42ad-8f28-e6d5547a5007 | ||||
| CVSS 3.1 | HIGH | MITRE-CVE |
Solution
- Update PostgreSQL to version 18.4 or later.
- Update PostgreSQL to version 17.10 or later.
- Update PostgreSQL to version 16.14 or later.
- Update PostgreSQL to version 15.18 or later.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2026-6477.
| URL | Resource |
|---|---|
| https://www.postgresql.org/support/security/CVE-2026-6477/ | Patch Vendor Advisory |
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2026-6477 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2026-6477
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2026-6477 vulnerability anywhere in the article.
-
CybersecurityNews
Critical PostgreSQL Vulnerabilities Enables Code Execution and SQL Injections
The PostgreSQL Global Development Group has released critical security updates for all supported branches, fixing 11 vulnerabilities, including arbitrary code execution and several SQL injection flaws ... Read more
The following table lists the changes that have been made to the
CVE-2026-6477 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
Initial Analysis by [email protected]
May. 18, 2026
Action Type Old Value New Value Added CPE Configuration OR *cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:* versions from (including) 16.0 up to (excluding) 16.14 *cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:* versions from (including) 17.0 up to (excluding) 17.10 *cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:* versions from (including) 18.0 up to (excluding) 18.4 *cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:* versions from (including) 15.0 up to (excluding) 15.18 *cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:* versions up to (excluding) 14.23 Added Reference Type PostgreSQL: https://www.postgresql.org/support/security/CVE-2026-6477/ Types: Patch, Vendor Advisory -
New CVE Received by f86ef6dc-4d3a-42ad-8f28-e6d5547a5007
May. 14, 2026
Action Type Old Value New Value Added Description Use of inherently dangerous function PQfn(..., result_is_int=0, ...) in PostgreSQL libpq lo_export(), lo_read(), lo_lseek64(), and lo_tell64() functions allows the server superuser to overwrite a client stack buffer with an arbitrarily-large response. Like gets(), PQfn(..., result_is_int=0, ...) stores arbitrary-length, server-determined data into a buffer of unspecified size. Because both the \lo_export command in psql and pg_dump call lo_read(), the server superuser can overwrite pg_dump or psql stack memory. Versions before PostgreSQL 18.4, 17.10, 16.14, 15.18, and 14.23 are affected. Added CVSS V3.1 AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H Added CWE CWE-242 Added Reference https://www.postgresql.org/support/security/CVE-2026-6477/