CVE-2026-6477: Use of Inherently Dangerous Function in PostgreSQL
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.
AI Analysis
Technical Summary
The vulnerability CVE-2026-6477 in PostgreSQL stems from the use of the PQfn function with result_is_int=0 in libpq functions lo_export(), lo_read(), lo_lseek64(), and lo_tell64(). This function stores arbitrary-length data from the server into a client buffer without size constraints, enabling a server superuser to overwrite the client stack buffer. This affects PostgreSQL versions before 18.4, 17.10, 16.14, 15.18, and 14.23. The vulnerability can be triggered via the \lo_export command in psql and during pg_dump operations, potentially corrupting stack memory. The CVSS 3.1 score is 8.8, indicating high severity with network attack vector, low attack complexity, no privileges required, user interaction required, unchanged scope, and high impact on confidentiality, integrity, and availability. No official patch or vendor advisory details are provided in the input.
Potential Impact
An attacker with server superuser privileges can exploit this vulnerability to overwrite client stack memory buffers with arbitrarily large data. This can lead to client application crashes or potentially arbitrary code execution on the client side. The vulnerability affects PostgreSQL client utilities such as psql and pg_dump when using the \lo_export command or lo_read() function. The high CVSS score reflects the critical impact on confidentiality, integrity, and availability if exploited. However, exploitation requires server superuser privileges and user interaction.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Since no official patch or remediation level is provided in the available data, users should monitor PostgreSQL vendor communications for updates. Until a fix is available, limit server superuser access and avoid using the affected functions or commands (\lo_export, lo_read) in untrusted environments. No vendor advisory states that no action is required or that the issue is already mitigated.
CVE-2026-6477: Use of Inherently Dangerous Function in 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.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability CVE-2026-6477 in PostgreSQL stems from the use of the PQfn function with result_is_int=0 in libpq functions lo_export(), lo_read(), lo_lseek64(), and lo_tell64(). This function stores arbitrary-length data from the server into a client buffer without size constraints, enabling a server superuser to overwrite the client stack buffer. This affects PostgreSQL versions before 18.4, 17.10, 16.14, 15.18, and 14.23. The vulnerability can be triggered via the \lo_export command in psql and during pg_dump operations, potentially corrupting stack memory. The CVSS 3.1 score is 8.8, indicating high severity with network attack vector, low attack complexity, no privileges required, user interaction required, unchanged scope, and high impact on confidentiality, integrity, and availability. No official patch or vendor advisory details are provided in the input.
Potential Impact
An attacker with server superuser privileges can exploit this vulnerability to overwrite client stack memory buffers with arbitrarily large data. This can lead to client application crashes or potentially arbitrary code execution on the client side. The vulnerability affects PostgreSQL client utilities such as psql and pg_dump when using the \lo_export command or lo_read() function. The high CVSS score reflects the critical impact on confidentiality, integrity, and availability if exploited. However, exploitation requires server superuser privileges and user interaction.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Since no official patch or remediation level is provided in the available data, users should monitor PostgreSQL vendor communications for updates. Until a fix is available, limit server superuser access and avoid using the affected functions or commands (\lo_export, lo_read) in untrusted environments. No vendor advisory states that no action is required or that the issue is already mitigated.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- PostgreSQL
- Date Reserved
- 2026-04-17T00:44:19.965Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a05cfe8ec166c07b0e13947
Added to database: 5/14/2026, 1:36:40 PM
Last enriched: 5/14/2026, 1:51:58 PM
Last updated: 5/15/2026, 6:28:25 AM
Views: 11
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.