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

- Severity: High 8.8 (CVSS:3.1, scored by PostgreSQL) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.45%, higher than 41% of CVEs (2026-12-02)
- Published: 2026-05-14T13:00:12.497Z
- Modified: 2026-11-11T20:10:00.273Z
- Also known as: BIT-POSTGRESQL-2026-6477
- Weaknesses: CWE-120, CWE-242
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: PostgreSQL

## 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.

(As written by CVE List.)

## Affected

- PostgreSQL: from 18 before 18.4; from 17 before 17.10; from 16 before 16.14; from 15 before 15.18; before 14.23 (not affected: from 0:9.2.24-9.el7_9.6 before *; from 0:13.23-3.el9_8 before *; from 0:13.23-1.el9_2.2 before *; from 0:13.23-1.el9_4.2 before *; from 0:13.23-1.el9_6.2 before *)
- postgresql18: no versions given (not affected: from 0:18.4-1.el10_2 before *)
- postgresql16: no versions given (not affected: from 0:16.14-1.el10_2 before *; from 0:16.14-1.el10_0 before *)
- libpq: no versions given (not affected: from 0:16.14-1.el10_2 before *; from 0:16.14-0.el10_0.1 before *; from 0:13.23-2.el8_10 before *; from 0:13.23-1.el8_4.1 before *; from 0:13.23-1.el8_6.1 before *; from 0:13.23-1.el8_8.1 before *; from 0:13.23-3.el9_8 before *; from 0:13.23-1.el9_2.1 before *; from 0:13.23-1.el9_4.1 before *; from 0:13.23-1.el9_6.1 before *)
- postgresql:15: no versions given (not affected: from 8100020260605152259.489197e6 before *; from 8080020260615085052.63b34585 before *; from 9080020260605124405.rhel9 before *; from 9020020260625101129.rhel9 before *; from 9040020260616071806.rhel9 before *; from 9060020260622062902.rhel9 before *)
- postgresql:16: no versions given (not affected: from 8100020260530205218.489197e6 before *; from 9080020260605131007.rhel9 before *; from 9040020260612132455.rhel9 before *; from 9060020260612084605.rhel9 before *)
- postgresql:13: no versions given (not affected: from 8100020260605152256.489197e6 before *; from 8040020260630100922.522a0ee4 before *; from 8060020260625065744.ad008a3a before *; from 8080020260709122729.63b34585 before *)
- postgresql:12: no versions given (not affected: from 8100020260605152253.489197e6 before *; from 8040020260624104459.522a0ee4 before *; from 8060020260623094704.ad008a3a before *; from 8080020260626093604.63b34585 before *)
- postgresql:18: no versions given (not affected: from 9080020260605125734.rhel9 before *)
- discovery/discovery-server-rhel9: no versions given (not affected: from 1786638573 before *)
- postgresql17-main: no versions given (not affected: from 17.10-0.1.hum1 before *)
- postgresql18-main: no versions given (not affected: from 18.4-0.1.hum1 before *)
- rhui5/rhua-rhel9: no versions given (not affected: from 1784795076 before *)
- rhui5/rhua-tp-rhel9: no versions given (not affected: from 1787241260 before *)
- postgresql-jdbc: no versions given
- ansible-automation-platform/bootc-automation-portal-rhel9: no versions given
- postgresql postgresql: before 14.23; from 15.0 before 15.18; from 16.0 before 16.14; from 17.0 before 17.10; from 18.0 before 18.4
- postgresql (Bitnami): before 14.23.0; from 15.0.0 before 15.18.0; from 16.0.0 before 16.14.0; from 17.0.0 before 17.10.0; from 18.0.0 before 18.4.0

## Every score

- PostgreSQL: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- redhat-SADP: CVSS:3.1 8.4 High `CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:H`
- Bitnami Vulnerability Database: rating High

## References

- <https://www.postgresql.org/support/security/CVE-2026-6477/> (advisory, patch, vendor-advisory)
- <https://access.redhat.com/security/cve/CVE-2026-6477> (vdb-entry, web)
- <https://bugzilla.redhat.com/show_bug.cgi?id=2477442> (issue-tracking, web)
- <https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-6477.json> (web)
- <https://access.redhat.com/errata/RHSA-2026:49521> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2026:50863> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2026:27718> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2026:44391> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2026:27743> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2026:27742> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2026:27738> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2026:28999> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2026:28208> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2026:26181> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2026:28143> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2026:44420> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2026:34362> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2026:34363> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2026:47090> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2026:29815> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2026:32994> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2026:35880> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2026:34043> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2026:42555> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2026:26561> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2026:49908> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2026:33497> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2026:29953> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2026:49909> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2026:33441> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2026:26524> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2026:29904> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2026:50779> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2026:32983> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2026:26525> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2026:29212> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2026:44308> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2026:28037> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2026:26203> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2026:26204> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2026:27741> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2026:54760> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2026:21182> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2026:22878> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2026:44481> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2026:58981> (vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-6477> (web)

## Sources

- CVE List: [CVE-2026-6477](https://www.cve.org/CVERecord?id=CVE-2026-6477), CVE Terms of Use, modified 2026-08-25
- NVD: [CVE-2026-6477](https://nvd.nist.gov/vuln/detail/CVE-2026-6477), Public domain, modified 2026-11-11
- Bitnami Vulnerability Database: [BIT-POSTGRESQL-2026-6477](https://osv.dev/vulnerability/BIT-POSTGRESQL-2026-6477), Apache-2.0, modified 2026-09-10

---

Page: https://cve.day/CVE-2026-6477 · Whole record: https://cve.day/CVE-2026-6477.json · Rebuilt by cve.day 2026-11-25T22:59:21.704Z
