Skip to main content

PostgreSQL CVE-2026-6637

| EUVDEUVD-2026-30291 HIGH
Stack-based Buffer Overflow (CWE-121)
2026-05-14 PostgreSQL GHSA-96xx-m79q-xh44
8.8
CVSS 3.1 · Vendor: PostgreSQL
View

Attack ChainAIDerived

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

  1. Recon
    Obtain database credentials
  2. Delivery
    Connect to PostgreSQL over network
  3. Exploit
    Craft malicious UPDATE with refint cascade
  4. Install
    Trigger stack buffer overflow in refint module
  5. C2
    Overwrite return address with shellcode
  6. Execute
    Execute arbitrary code as postgres OS user
  7. Impact
    Establish persistence and lateral movement

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Stack buffer bounds checking
MITRE ATT&CK

1 technique across 1 tactic: Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Requires valid database credentials with low-level privileges (PR:L) - any authenticated database user can exploit, including read-only accounts if they retain UPDATE privileges on tables with refint constraints. The stack overflow attack path requires the target database to use the refint module for referential integrity constraints and the attacker must be able to issue UPDATE statements against tables participating in these constraints. The SQL injection attack path has a more specific precondition: the application must declare a user-controllable column as a refint cascade primary key AND allow user-supplied data to flow into primary key update operations - a non-default configuration requiring deliberate application design choices. No user interaction (UI:N) or elevated authentication beyond basic database login is required. Exploitation is possible against default PostgreSQL installations where the refint module is included in standard distributions, but actual exploitability depends on whether database schema uses refint constraints and whether attackers have UPDATE privileges on affected tables.

Impact

CVSS 8.8 with network vector (AV:N), low complexity (AC:L), and low privileges required (PR:L) indicates straightforward remote exploitation by any authenticated database user. The high impact across confidentiality, integrity, and availability (C:H/I:H/A:H) reflects OS-level code execution capability - a complete system compromise extending beyond database boundaries. However, real-world risk depends heavily on deployment context: the PR:L requirement means attackers need existing database credentials, and the dual attack paths have different preconditions. The stack overflow requires access to refint module operations, while SQL injection requires application-specific conditions (user-controlled refint cascade primary keys). No CISA KEV listing or EPSS data provided suggests exploitation not yet observed in the wild, but the combination of network accessibility, low attack complexity, and severe impact warrants urgent patching priority for any PostgreSQL instance with untrusted database users. Organizations with strict database access controls and application-layer input validation face lower immediate risk than multi-tenant database environments or systems with broad user database privileges.

Exploit ScenarioDerived

An attacker with low-privilege database credentials (e.g., application service account or compromised user login) connects to the PostgreSQL instance over the network. For the stack overflow path, the attacker crafts a malicious UPDATE statement targeting a table with refint cascade constraints, embedding payload data that triggers buffer overflow during refint module processing of the cascade operation. The overflow overwrites stack memory with shellcode, redirecting execution to attacker-controlled code running as the postgres operating system user, granting full system access. Alternatively, if the application exposes user-controlled input to a refint cascade primary key column, the attacker injects SQL commands into the primary key update value, which executes with the privileges of the database user performing the update operation, enabling data exfiltration or further privilege escalation.

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

Stack buffer overflow in PostgreSQL's refint module allows low-privileged database users to execute arbitrary code as the database operating system user across all supported versions before 14.23, 15.18, 16.14, 17.10, and 18.4. The vulnerability enables two distinct attack paths: direct stack overflow leading to OS-level code execution, and SQL injection when applications expose user-controlled columns configured as refint cascade primary keys. With CVSS 8.8 (AV:N/AC:L/PR:L) and network-based exploitation requiring only low-privilege database credentials, this represents a critical privilege escalation risk for PostgreSQL deployments. No active exploitation (CISA KEV) or public POC identified at time of analysis.

RemediationAI

Upgrade immediately to patched versions: PostgreSQL 18.4, 17.10, 16.14, 15.18, or 14.23 depending on your major version branch. Download patches from official PostgreSQL release channels at https://www.postgresql.org/support/security/CVE-2026-6637/ and follow standard PostgreSQL upgrade procedures including pre-upgrade backups and testing. If immediate patching is not feasible, implement compensating controls: (1) Revoke database privileges from untrusted users, particularly permissions to modify tables using refint constraints - note this may break application functionality requiring dynamic schema modifications. (2) Deploy database firewall rules restricting network connections to trusted application servers only, reducing AV:N to AV:A attack surface but not eliminating risk from compromised application servers. (3) For the SQL injection vector specifically, audit application code to identify any user-controlled columns declared as refint cascade primary keys and implement strict input validation or remove refint declarations - this requires code changes and schema migrations. (4) Enable PostgreSQL audit logging (pgaudit extension) to detect exploitation attempts via unusual refint operations or primary key update patterns. All compensating controls provide partial risk reduction only; version upgrade remains the definitive mitigation.

Affected VersionsENISA

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

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

The refint module in PostgreSQL implements referential integrity constraints for foreign key relationships. CWE-121 (stack-based buffer overflow) indicates unsafe memory operations in refint's handling of cascade operations on primary key updates. When user input exceeds allocated stack buffer space during refint constraint processing, attackers can overwrite return addresses or function pointers to redirect execution flow. The secondary SQL injection vector arises when applications bind user-controlled data to columns participating in refint cascade relationships, allowing injection of arbitrary SQL during the primary key update propagation phase. CPE identifier cpe:2.3:a:n/a:postgresql confirms this affects the core PostgreSQL database engine across major version branches 14 through 18.

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:L/UI:N/S:U/C:H/I:H/A:H
SUSE HIGH
Red Hat 8.8 HIGH

Primary rating from Vendor (PostgreSQL).

CVSS VectorVendor: PostgreSQL

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
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

Stack buffer overflow in PostgreSQL module "refint" allows an unprivileged database user to execute arbitrary code as the operating system user running the database. A distinct attack is possible if the application declares a user-controlled column as a "refint" cascade primary key and facilitates user-controlled updates to that column. In that case, a SQL injection allows a primary key update value provider to execute arbitrary SQL as the database user performing the primary key update. Versions before PostgreSQL 18.4, 17.10, 16.14, 15.18, and 14.23 are affected.

Executive ViewAI

Why It Matters

A stack buffer overflow in PostgreSQL's refint module (CVE-2026-6637, CVSS 8.8) allows low-privileged database users to execute arbitrary code with database server operating system privileges, affecting all supported PostgreSQL versions through 14.23, 15.18, 16.14, 17.10, and 18.4. This vulnerability enables privilege escalation from authenticated database user to OS-level code execution, creating a critical risk for any organization running vulnerable PostgreSQL instances with user-managed or untrusted database accounts.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) Disable the refint module by removing it from shared_preload_libraries in postgresql.conf and restarting the database service; (2) Restrict database user privileges using role-based access control-revoke unnecessary permissions from low-privileged accounts and enforce principle of least privilege; (3) Implement network segmentation to limit database connectivity to trusted application servers only, reducing exposure from untrusted user connections; (4) Enable PostgreSQL logging and monitoring for suspicious SQL patterns; (5) Consider temporary migration of critical workloads to patched PostgreSQL versions in isolated environments if available.

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

SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

A stack-based buffer overflow occurs when a program writes more data to a buffer located on the stack than it was allocated to hold.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

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://access.redhat.com/errata/RHSA-2026:26181 ADVISORY https://access.redhat.com/errata/RHSA-2026:26203 ADVISORY https://access.redhat.com/errata/RHSA-2026:26204 ADVISORY https://access.redhat.com/errata/RHSA-2026:26524 ADVISORY https://access.redhat.com/errata/RHSA-2026:26525 ADVISORY https://access.redhat.com/errata/RHSA-2026:26561 ADVISORY https://access.redhat.com/errata/RHSA-2026:27718 ADVISORY https://access.redhat.com/errata/RHSA-2026:27741 ADVISORY https://access.redhat.com/errata/RHSA-2026:27742 ADVISORY https://access.redhat.com/errata/RHSA-2026:27743 ADVISORY https://access.redhat.com/errata/RHSA-2026:28037 ADVISORY https://access.redhat.com/errata/RHSA-2026:28143 ADVISORY https://access.redhat.com/errata/RHSA-2026:28208 ADVISORY https://access.redhat.com/errata/RHSA-2026:28999 ADVISORY https://access.redhat.com/errata/RHSA-2026:29212 ADVISORY https://access.redhat.com/errata/RHSA-2026:29815 ADVISORY https://access.redhat.com/errata/RHSA-2026:29904 ADVISORY https://access.redhat.com/errata/RHSA-2026:29953 ADVISORY https://access.redhat.com/errata/RHSA-2026:32983 ADVISORY https://access.redhat.com/errata/RHSA-2026:32994 ADVISORY https://access.redhat.com/errata/RHSA-2026:33441 ADVISORY https://access.redhat.com/errata/RHSA-2026:33497 ADVISORY https://access.redhat.com/errata/RHSA-2026:34043 ADVISORY https://access.redhat.com/errata/RHSA-2026:34362 ADVISORY https://access.redhat.com/errata/RHSA-2026:34363 ADVISORY https://access.redhat.com/errata/RHSA-2026:42555 ADVISORY https://access.redhat.com/errata/RHSA-2026:44481 ADVISORY https://nvd.nist.gov/vuln/detail/CVE-2026-6637 ADVISORY https://ubuntu.com/security/notices/USN-8294-1 ADVISORY https://vuldb.com/vuln/363870 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://www.postgresql.org/support/security/CVE-2026-6637/

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