CVE-2026-6477: 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...
High CVSS 8.8
- CVE id
- CVE-2026-6477
- Published
- Last modified
Affected packages
| Package | Affected versions | Fixed in |
|---|---|---|
| PostgreSQL Runtimes and servers |
< 14.23 >= 15.0, < 15.18 >= 16.0, < 16.14 >= 17.0, < 17.10 >= 18.0, < 18.4 |
14.23, 15.18, 16.14, 17.10, 18.4 |
How to fix it
Upgrade PostgreSQL to the fixed release of the line you run: 14.23, 15.18, 16.14, 17.10, 18.4.
psql -c 'SELECT version();'
- Install the patched PostgreSQL minor release of your major version (the postgres image tag, the PGDG packages, or your provider's maintenance update) and restart the server; minor releases need no dump or pg_upgrade.
A free AIssue account reads the runtime versions your repositories pin (version files, Dockerfiles, build files) and tells you when one is affected.
Details
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.
References
- CVE-2026-6477 on the NVD
- Advisory: https://nvd.nist.gov/vuln/detail/CVE-2026-6477
- Web: https://www.postgresql.org/support/security/CVE-2026-6477/
- Web: https://access.redhat.com/errata/RHSA-2026:21182
- Web: https://access.redhat.com/errata/RHSA-2026:22878
- Web: https://access.redhat.com/errata/RHSA-2026:26181
- Web: https://access.redhat.com/errata/RHSA-2026:26203
- Web: https://access.redhat.com/errata/RHSA-2026:26204
- Web: https://access.redhat.com/errata/RHSA-2026:26524
- Web: https://access.redhat.com/errata/RHSA-2026:26525
- Web: https://access.redhat.com/errata/RHSA-2026:26561
- Web: https://access.redhat.com/errata/RHSA-2026:27718
- Web: https://access.redhat.com/errata/RHSA-2026:27738
- Web: https://access.redhat.com/errata/RHSA-2026:27741
- Web: https://access.redhat.com/errata/RHSA-2026:27742
- Web: https://access.redhat.com/errata/RHSA-2026:27743
- Web: https://access.redhat.com/errata/RHSA-2026:28037
- Web: https://access.redhat.com/errata/RHSA-2026:28143
- Web: https://access.redhat.com/errata/RHSA-2026:28208
- Web: https://access.redhat.com/errata/RHSA-2026:28999
- Web: https://access.redhat.com/errata/RHSA-2026:29212
Am I affected?
Upload or paste your lockfile. We check every package version in it against OSV.dev, this advisory included, and email you the vulnerable ones with the version that fixes them. Free, and no account needed.
About this data
Source: National Vulnerability Database (NVD) (public domain). Severity comes from the advisory's own rating when it has one, else from its CVSS score.