Logo
-

Byte Open Security

(ByteOS Network)

Log In

Sign Up

ByteOS

Security
Vulnerability Details
Registries
Custom Views
Weaknesses
Attack Patterns
Filters & Tools
Vulnerability Details :

CVE-2026-6477

Summary
Assigner-PostgreSQL
Assigner Org ID-f86ef6dc-4d3a-42ad-8f28-e6d5547a5007
Published At-14 May, 2026 | 13:00
Updated At-15 May, 2026 | 03:56
Rejected At-
Credits

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

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.

Vendors
-
Not available
Products
-
Metrics (CVSS)
VersionBase scoreBase severityVector
Weaknesses
Attack Patterns
Solution/Workaround
References
HyperlinkResource Type
EPSS History
Score
Latest Score
-
N/A
No data available for selected date range
Percentile
Latest Percentile
-
N/A
No data available for selected date range
Stakeholder-Specific Vulnerability Categorization (SSVC)
▼Common Vulnerabilities and Exposures (CVE)
cve.org
Assigner:PostgreSQL
Assigner Org ID:f86ef6dc-4d3a-42ad-8f28-e6d5547a5007
Published At:14 May, 2026 | 13:00
Updated At:15 May, 2026 | 03:56
Rejected At:
▼CVE Numbering Authority (CNA)
PostgreSQL libpq lo_* functions let server superuser overwrite client stack memory

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.

Affected Products
Vendor
n/a
Product
PostgreSQL
Default Status
unaffected
Versions
Affected
  • From 18 before 18.4 (rpm)
  • From 17 before 17.10 (rpm)
  • From 16 before 16.14 (rpm)
  • From 15 before 15.18 (rpm)
  • From 0 before 14.23 (rpm)
Problem Types
TypeCWE IDDescription
CWECWE-242Use of Inherently Dangerous Function
Type: CWE
CWE ID: CWE-242
Description: Use of Inherently Dangerous Function
Metrics
VersionBase scoreBase severityVector
3.18.8HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Version: 3.1
Base score: 8.8
Base severity: HIGH
Vector:
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Metrics Other Info
Impacts
CAPEC IDDescription
Solutions

Configurations

Workarounds

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

Exploits

Credits

The PostgreSQL project thanks Yu Kunpeng and Martin Heistermann for reporting this problem.
Timeline
EventDate
Replaced By

Rejected Reason

References
HyperlinkResource
https://www.postgresql.org/support/security/CVE-2026-6477/
N/A
Hyperlink: https://www.postgresql.org/support/security/CVE-2026-6477/
Resource: N/A
▼Authorized Data Publishers (ADP)
CISA ADP Vulnrichment
Affected Products
Metrics
VersionBase scoreBase severityVector
Metrics Other Info
Impacts
CAPEC IDDescription
Solutions

Configurations

Workarounds

Exploits

Credits

Timeline
EventDate
Replaced By

Rejected Reason

References
HyperlinkResource
Information is not available yet
▼National Vulnerability Database (NVD)
nvd.nist.gov
Source:f86ef6dc-4d3a-42ad-8f28-e6d5547a5007
Published At:14 May, 2026 | 14:16
Updated At:18 May, 2026 | 15:03

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.

CISA Catalog
Date AddedDue DateVulnerability NameRequired Action
N/A
Date Added: N/A
Due Date: N/A
Vulnerability Name: N/A
Required Action: N/A
Metrics
TypeVersionBase scoreBase severityVector
Secondary3.18.8HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Type: Secondary
Version: 3.1
Base score: 8.8
Base severity: HIGH
Vector:
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
CPE Matches

The PostgreSQL Global Development Group
postgresql
>>postgresql>>Versions before 14.23(exclusive)
cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:*
The PostgreSQL Global Development Group
postgresql
>>postgresql>>Versions from 15.0(inclusive) to 15.18(exclusive)
cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:*
The PostgreSQL Global Development Group
postgresql
>>postgresql>>Versions from 16.0(inclusive) to 16.14(exclusive)
cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:*
The PostgreSQL Global Development Group
postgresql
>>postgresql>>Versions from 17.0(inclusive) to 17.10(exclusive)
cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:*
The PostgreSQL Global Development Group
postgresql
>>postgresql>>Versions from 18.0(inclusive) to 18.4(exclusive)
cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:*
Weaknesses
CWE IDTypeSource
CWE-242Secondaryf86ef6dc-4d3a-42ad-8f28-e6d5547a5007
CWE ID: CWE-242
Type: Secondary
Source: f86ef6dc-4d3a-42ad-8f28-e6d5547a5007
Evaluator Description

Evaluator Impact

Evaluator Solution

Vendor Statements

References
HyperlinkSourceResource
https://www.postgresql.org/support/security/CVE-2026-6477/f86ef6dc-4d3a-42ad-8f28-e6d5547a5007
Patch
Vendor Advisory
Hyperlink: https://www.postgresql.org/support/security/CVE-2026-6477/
Source: f86ef6dc-4d3a-42ad-8f28-e6d5547a5007
Resource:
Patch
Vendor Advisory

Change History

0
Information is not available yet

Similar CVEs

1Records found

CVE-2026-6475
Matching Score-8
Assigner-PostgreSQL
ShareView Details
Matching Score-8
Assigner-PostgreSQL
CVSS Score-8.8||HIGH
EPSS-0.05% / 15.56%
||
7 Day CHG~0.00%
Published-14 May, 2026 | 13:00
Updated-18 May, 2026 | 15:02
Rejected-Not Available
Known To Be Used In Ransomware Campaigns?-Not Available
KEV Added-Not Available
KEV Action Due Date-Not Available
PostgreSQL pg_basebackup and pg_rewind can overwrite unrelated files of origin superuser choice

Symlink following in PostgreSQL pg_basebackup plain format and in pg_rewind allows an origin superuser to overwrite local files, e.g. /var/lib/postgres/.bashrc, that hijack the operating system account. It will remain the case that starting the server after these commands implicitly trusts the origin superuser, due to features like shared_preload_libraries. Hence, the attack has practical implications only if one takes relevant action between these commands and server start, like moving the files to a different VM or snapshotting the VM. Versions before PostgreSQL 18.4, 17.10, 16.14, 15.18, and 14.23 are affected.

Action-Not Available
Vendor-n/aThe PostgreSQL Global Development Group
Product-postgresqlPostgreSQL
CWE ID-CWE-61
UNIX Symbolic Link (Symlink) Following
Details not found