CVE-2026-6477: PostgreSQL libpq lo_* functions let server superuser overwrite client stack memory

Published May 14, 2026
·
Updated

Last updated 22 May 2026

Other sources

PostgreSQL libpq lo functions let server superuser overwrite client stack memory

Microsoft

Use of inherently dangerous function PQfn(..., resultisint=0, ...) in PostgreSQL libpq loexport(), loread(), lolseek64(), and lotell64() functions allows the server superuser to overwrite a client stack buffer with an arbitrarily-large response. Like gets(), PQfn(..., resultisint=0, ...) stores arbitrary-length, server-determined data into a buffer of unspecified size. Because both the \loexport command in psql and pgdump call loread(), the server superuser can overwrite pgdump or psql stack memory. Versions before PostgreSQL 18.4, 17.10, 16.14, 15.18, and 14.23 are affected.

MITRE

Affected Software

11 affected componentsFixes available
PostgreSQL postgresql<18.4, <17.10, <16.14, <15.18, <14.23
Microsoft azl3 postgresql 16.12-1
PostgreSQL postgresql<14.23
PostgreSQL postgresql>=15.0<15.18
PostgreSQL postgresql>=16.0<16.14
PostgreSQL postgresql>=17.0<17.10
PostgreSQL postgresql>=18.0<18.4
debian/postgresql-13<=13.16-0+deb11u1, <=13.23-0+deb11u3
debian/postgresql-15<=15.17-0+deb12u1
15.18-0+deb12u1
debian/postgresql-17<=17.9-0+deb13u1
17.10-0+deb13u1
debian/postgresql-18
18.4-1

Event History

May 14, 2026
CVE Published
via MITRE·01:00 PM
Data Sourced
via MITRE·01:00 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·02:16 PM
RemedyDescriptionSeverityWeaknessAffected Software
May 16, 2026
Data Sourced
via Microsoft·08:04 AM
DescriptionSeverityWeaknessAffected Software
Updated
via Microsoft·08:04 AM
DescriptionSeverity
May 21, 2026
Data Sourced
via Launchpad·10:49 PM
Description
May 22, 2026
Data Sourced
via Ubuntu·10:49 PM
RemedyDescriptionSeverityAffected Software
May 25, 2026
Data Sourced
via Debian·10:55 PM
DescriptionAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-6477?

CVE-2026-6477 has a critical severity rating due to potential exploitation by a server superuser to overwrite client stack memory.

2

How do I fix CVE-2026-6477?

To fix CVE-2026-6477, update PostgreSQL to a version higher than 18.4, 17.10, 16.14, 15.18, or 14.23.

3

Who is affected by CVE-2026-6477?

CVE-2026-6477 affects users running PostgreSQL versions up to 18.4, 17.10, 16.14, 15.18, and 14.23.

4

What functionality in PostgreSQL is impacted by CVE-2026-6477?

CVE-2026-6477 impacts the PostgreSQL libpq functions, including lo_export(), lo_read(), lo_lseek64(), and lo_tell64().

5

What could happen if CVE-2026-6477 is exploited?

If exploited, CVE-2026-6477 can allow a superuser to overwrite a client's stack buffer, which may lead to arbitrary code execution.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203