Skip to main content

PostgreSQL libpq EUVDEUVD-2026-30283

| CVE-2026-6477 HIGH
Use of Inherently Dangerous Function (CWE-242)
2026-05-14 PostgreSQL GHSA-jm5f-gpfq-q9h3
8.8
CVSS 3.1 · Vendor: PostgreSQL
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Compromise PostgreSQL server
  2. Delivery
    Gain superuser privileges
  3. Exploit
    Wait for admin client connection
  4. Install
    Client invokes lo_* function
  5. C2
    Send oversized malicious response
  6. Execute
    Overflow client stack buffer
  7. Impact
    Execute arbitrary code on client

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Use of inherently dangerous function
Exploitation Conditions

Requires victim to connect PostgreSQL client tools (psql with \lo_export command or pg_dump) to an attacker-controlled or compromised PostgreSQL server where the attacker has server superuser privileges. Exploitation occurs when client operations invoke affected large object functions: lo_export(), lo_read(), lo_lseek64(), or lo_tell64(). Most commonly triggered during database backup operations (pg_dump automatically reads large objects) or manual large object export operations. The attack does NOT require the client user to have any special database privileges, but the attacker must control the server side. Default PostgreSQL client configurations are vulnerable, no special client-side settings required. Limits exploitation: victim must initiate connection to malicious server (social engineering or compromised infrastructure required); attacker must first achieve PostgreSQL superuser role on a server the victim will connect to.

Impact

CVSS 8.8 (High) with network vector, low complexity, no privileges required but user interaction required accurately reflects the attack prerequisites. The user interaction requirement (PR:N/UI:R) means administrators must connect their legitimate psql or pg_dump clients to a compromised PostgreSQL server, limiting casual exploitation. However, the impact is severe: complete compromise of client systems running database administrative tools with administrator privileges. The vulnerability inverts the typical database threat model where servers are protected from malicious clients, instead weaponizing the server against administrative clients. Real-world risk depends heavily on organizational trust models: environments with untrusted database servers or those connecting to third-party/customer-managed PostgreSQL instances face elevated risk. Internal-only, fully-trusted PostgreSQL deployments have lower practical risk unless an attacker first compromises the database server. SSVC technical impact is total (arbitrary code execution). Attack automation is limited by the need for attacker-controlled database server positioning. No EPSS or KEV data available at time of analysis, suggesting recent disclosure without observed exploitation. Priority should be highest for environments performing pg_dump backups against external or semi-trusted PostgreSQL servers.

Exploit ScenarioDerived

A database administrator connects pg_dump to perform a routine backup of a PostgreSQL server that has been compromised by an attacker who gained superuser access. During the backup operation, when pg_dump calls lo_read() to export large object data, the malicious server responds with a crafted, oversized response that overflows the client's stack buffer. The attacker's payload overwrites the return address on the stack, redirecting execution to shellcode that establishes a reverse shell with the administrator's privileges on the backup server.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – May 14, 2026

PostgreSQL libpq client library allows malicious server superusers to execute arbitrary code on connecting clients by overwriting stack buffers via unbounded responses to PQfn() calls. The vulnerability affects lo_export(), lo_read(), lo_lseek64(), and lo_tell64() functions used by psql and pg_dump utilities. A compromised or malicious PostgreSQL server can exploit clients running these common administrative tools during routine operations like database backups or large object exports. EPSS and KEV data not available for this recent CVE. CVSS 8.8 reflects the network attack vector with user interaction requirement (connecting to malicious server).

RemediationAI

Upgrade PostgreSQL client libraries and utilities to patched versions: 18.4, 17.10, 16.14, 15.18, or 14.23 or later as appropriate for your major version branch. Consult https://www.postgresql.org/support/security/CVE-2026-6477/ for release details and download links. Until patching is complete, implement these compensating controls: restrict pg_dump and psql usage to connect only to explicitly trusted PostgreSQL servers under your organization's administrative control; avoid using \lo_export commands or backing up databases containing large objects from untrusted sources; run pg_dump and psql with minimal operating system privileges using dedicated service accounts rather than administrative accounts to limit post-exploitation impact. Note that restricting client privileges reduces but does not eliminate risk since stack buffer overwrites can achieve code execution regardless of process privilege level. Network-level controls (limiting which servers clients can reach) provide more effective mitigation than permission restrictions. The only complete mitigation is patching the client library.

Affected VersionsENISA

PostgreSQL 17 <17.10
PostgreSQL 15 <15.18
PostgreSQL 16 <16.14
PostgreSQL 0 <14.23
PostgreSQL 18 <18.4

Affected Packages

euvd postgresql fix: 14.23, 15.18, 16.14, 17.10, 18.4

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

PostgreSQL libpq is the C client library for PostgreSQL database connections. The vulnerability stems from CWE-242 (Use of Inherently Dangerous Function) where PQfn() with result_is_int=0 parameter acts like the deprecated gets() function, storing server-provided data of arbitrary length into fixed-size client stack buffers without bounds checking. The affected large object (lo_*) functions use this unsafe PQfn() invocation pattern. When psql executes \lo_export commands or pg_dump performs backups involving large objects, these functions trust server responses without validating response length against local buffer capacity. CPE data indicates broad product impact across PostgreSQL versions. This represents a trust boundary violation where client-side code implicitly trusts server-provided metadata about response sizes.

Know when PostgreSQL gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (PostgreSQL) PRIMARY 8.8 HIGH
AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
SUSE HIGH
Red Hat 8.4 HIGH

Primary rating from Vendor (PostgreSQL).

CVSS VectorVendor: PostgreSQL

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

2
Patch available
May 14, 2026 - 15:01 EUVD
CVE Published
May 14, 2026 - 13:00 nvd
HIGH 8.8

DescriptionCVE.org

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.

Executive ViewAI

Why It Matters

CVE-2026-6477 affects PostgreSQL's libpq client library, allowing malicious database servers to execute arbitrary code on administrative clients (psql, pg_dump) during routine operations like backups and exports. Organizations relying on PostgreSQL for critical data management face potential compromise of administrative workstations and lateral movement into internal networks when connecting to untrusted or compromised database instances.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) Restrict PostgreSQL client connections to internal, administratively-controlled servers only; (2) Implement network segmentation isolating administrative workstations from untrusted database infrastructure; (3) Disable or restrict large object export/import functions if operationally feasible; (4) Monitor outbound connections from systems running psql/pg_dump for connections to non-approved database servers; (5) Enforce client certificate authentication and disable password-based authentication to reduce server compromise risk.

Threat Intelligence Overview

EPSS Score
0.0%
Top 88% exploitable
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment MSRC Vendor VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

CVE-2025-1094 HIGH POC
8.1 Feb 13

PostgreSQL libpq functions PQescapeLiteral(), PQescapeIdentifier(), PQescapeString(), and PQescapeStringConn() improperl

CVE-2024-55964 CRITICAL POC
9.8 Mar 26

An issue was discovered in Appsmith before 1.52. Rated critical severity (CVSS 9.8), this vulnerability is remotely expl

CVE-2013-1899 MEDIUM POC
6.5 Apr 04

Argument injection vulnerability in PostgreSQL 9.2.x before 9.2.4, 9.1.x before 9.1.9, and 9.0.x before 9.0.13 allows re

CVE-2026-20253 CRITICAL POC
9.8 Jun 10

Unauthenticated arbitrary file write in Splunk Enterprise (below 10.2.4 and 10.0.7) and Splunk Cloud Platform (below 10.

CVE-2026-9586 CRITICAL POC
9.3 Jul 17

Unauthenticated SQL injection in Sangoma Switchvox SMB Edition 8.3 (build 104997) lets remote attackers execute arbitrar

CVE-2017-7546 CRITICAL
9.8 Aug 16

PostgreSQL versions before 9.2.22, 9.3.18, 9.4.13, 9.5.8 and 9.6.4 are vulnerable to incorrect authentication flaw allow

CVE-2015-1352 MEDIUM POC
5.0 Mar 30

The build_tablename function in pgsql.c in the PostgreSQL (aka pgsql) extension in PHP through 5.6.7 does not validate t

CVE-2024-10553 CRITICAL POC
9.8 Mar 20

A vulnerability in the h2oai/h2o-3 REST API versions 3.46.0.4 allows unauthenticated remote attackers to execute arbitra

CVE-2019-9193 HIGH POC
7.2 Apr 01

In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows superusers and users in the 'pg_execute_serve

CVE-2026-40887 CRITICAL POC
9.1 Apr 14

Unauthenticated SQL injection in Vendure Shop API allows remote attackers to execute arbitrary SQL commands against the

CVE-2022-24760 CRITICAL POC
10.0 Mar 12

Parse Server is an open source http web server backend. Rated critical severity (CVSS 10.0), this vulnerability is remot

CVE-2025-56157 CRITICAL POC
9.8 Dec 18

Hard-coded default PostgreSQL credentials shipped in the docker-compose.yaml of langgenius Dify through version 1.5.1 al

Vendor StatusVendor

SUSE

Severity: High
Product Status
SUSE Linux Enterprise Desktop 15 SP7 SUSE Linux Enterprise Module for Basesystem 15 SP7 Fixed
SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS Fixed
SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS Fixed
SUSE Linux Enterprise High Performance Computing 15 SP5-ESPOS Fixed
SUSE Linux Enterprise High Performance Computing 15 SP5-LTSS Fixed

References

Advisories & patches
ADVISORY https://access.redhat.com/errata/RHSA-2026:21182 ADVISORY https://access.redhat.com/errata/RHSA-2026:22878 ADVISORY https://nvd.nist.gov/vuln/detail/CVE-2026-6477 ADVISORY https://ubuntu.com/security/notices/USN-8294-1 ADVISORY https://vuldb.com/vuln/363874 ADVISORY https://www.suse.com/support/update/SUSE-SU-2026:1942/ ADVISORY https://www.suse.com/support/update/SUSE-SU-2026:1943/ ADVISORY https://www.suse.com/support/update/SUSE-SU-2026:1944/ ADVISORY https://www.suse.com/support/update/SUSE-SU-2026:1945/ ADVISORY https://www.suse.com/support/update/SUSE-SU-2026:1946/ ADVISORY https://www.suse.com/support/update/SUSE-SU-2026:1999/ ADVISORY https://www.suse.com/support/update/SUSE-SU-2026:2000/ ADVISORY https://www.suse.com/support/update/SUSE-SU-2026:2001/ ADVISORY https://www.suse.com/support/update/SUSE-SU-2026:2007/ REF https://access.redhat.com/errata/RHSA-2026:26181 REF https://access.redhat.com/errata/RHSA-2026:26203 REF https://access.redhat.com/errata/RHSA-2026:26204 REF https://access.redhat.com/errata/RHSA-2026:26524 REF https://access.redhat.com/errata/RHSA-2026:26525 REF https://access.redhat.com/errata/RHSA-2026:26561 REF https://access.redhat.com/errata/RHSA-2026:27718 REF https://access.redhat.com/errata/RHSA-2026:27738 REF https://access.redhat.com/errata/RHSA-2026:27741 REF https://access.redhat.com/errata/RHSA-2026:27742 REF https://access.redhat.com/errata/RHSA-2026:27743 REF https://access.redhat.com/errata/RHSA-2026:28037 REF https://access.redhat.com/errata/RHSA-2026:28143 REF https://access.redhat.com/errata/RHSA-2026:28208 REF https://access.redhat.com/errata/RHSA-2026:28999 REF https://access.redhat.com/errata/RHSA-2026:29212 REF https://access.redhat.com/errata/RHSA-2026:29815 REF https://access.redhat.com/errata/RHSA-2026:29904 REF https://access.redhat.com/errata/RHSA-2026:29953 REF https://access.redhat.com/errata/RHSA-2026:32983 REF https://access.redhat.com/errata/RHSA-2026:32994 REF https://access.redhat.com/errata/RHSA-2026:33441 REF https://access.redhat.com/errata/RHSA-2026:33497 REF https://access.redhat.com/errata/RHSA-2026:34043 REF https://access.redhat.com/errata/RHSA-2026:34362 REF https://access.redhat.com/errata/RHSA-2026:34363 REF https://access.redhat.com/errata/RHSA-2026:35880 REF https://access.redhat.com/errata/RHSA-2026:42555 REF https://access.redhat.com/errata/RHSA-2026:44308 REF https://access.redhat.com/errata/RHSA-2026:44391 REF https://access.redhat.com/errata/RHSA-2026:44420 REF https://access.redhat.com/errata/RHSA-2026:44481 REF https://access.redhat.com/errata/RHSA-2026:47090 REF https://access.redhat.com/errata/RHSA-2026:49521 REF https://access.redhat.com/errata/RHSA-2026:49908 REF https://access.redhat.com/errata/RHSA-2026:49909 REF https://access.redhat.com/errata/RHSA-2026:50779 REF https://access.redhat.com/errata/RHSA-2026:50863 REF https://access.redhat.com/errata/RHSA-2026:54760 REF https://access.redhat.com/errata/RHSA-2026:58981 REF https://access.redhat.com/security/cve/CVE-2026-6477 REF https://bugzilla.redhat.com/show_bug.cgi?id=2477442 REF https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-6477.json REF https://www.postgresql.org/support/security/CVE-2026-6477/

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy