Skip to content
CVE Tracker
  • Newest CVEsPage
  • Recently added to KEVPage
  • Rising exploitation (EPSS)Page
  • Weekly digestPage
  • StatisticsPage
  • WatchlistPage
  • API documentationPage
  • MCP serverPage
  • Data sourcesPage
  • ChangelogPage
  • AboutPage
  • How it's builtPage
Back

CVE-2026-6477

PostgreSQL libpq lo_* functions let server superuser overwrite client stack memory

High8.8EPSS 0.45%
Published
Updated
Reserved
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.

Scores

CVSS scores of CVE-2026-6477, by who scored it
Scored byCVSSScoreVector
PostgreSQLCNA (assigner)3.1High8.8CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
redhat-SADPADP (enrichment)3.1High8.4CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:H
NVDNVD · Modified3.1High8.8CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS (exploitation in 30 days)
0.45% · top 60% of all CVEs (6 Nov 2026)
CISA SSVC
Exploitation: none · Automatable: no · Technical impact: total
Loading the EPSS history…

The list uses the assigner's score when there is one, then CISA's, then NVD's: High 8.8.

Weakness

Affected products

  • PostgreSQL

    • affected 18 – < 18.4
    • affected 17 – < 17.10
    • affected 16 – < 16.14
    • affected 15 – < 15.18
    • affected < 14.23

What to do

Workaround: use PQexecPrepared(), not PQfn(..., result_is_int=0, ...) or its lo_* wrappers

References (46)

Sources

The same CVE in the primary databases and aggregators, to check against.

Badge for a README or a ticket

CVE-2026-6477 badge
[![CVE-2026-6477](https://trackcve.app/badge/CVE-2026-6477.svg)](https://trackcve.app/cve/CVE-2026-6477)

Record last updated .