CVE-2026-6477
Use of inherently dangerous function PQfn(..., result_is_int=0, …
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.
What to do now
- Check your exposureFind out whether the affected software runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Limit access until thenIf you cannot update at once, take the system off the internet or restrict who can reach it.
References
- www.postgresql.org/support/security/CVE-2026-6477/
- access.redhat.com/errata/RHSA-2026:21182
- access.redhat.com/errata/RHSA-2026:22878
- access.redhat.com/errata/RHSA-2026:26181
- access.redhat.com/errata/RHSA-2026:26203
- access.redhat.com/errata/RHSA-2026:26204
- access.redhat.com/errata/RHSA-2026:26524
- access.redhat.com/errata/RHSA-2026:26525
- nvd.nist.gov/vuln/detail/CVE-2026-6477
- cve.org/CVERecord?id=CVE-2026-6477
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.