Skip to main content

PostgreSQL ECPG EUVDEUVD-2026-57850

| CVE-2026-16241 LOW
Integer Underflow (CWE-191)
2026-08-13 f86ef6dc-4d3a-42ad-8f28-e6d5547a5007 GHSA-v76f-gmv6-95jw
3.8
CVSS 3.1 · Vendor: f86ef6dc-4d3a-42ad-8f28-e6d5547a5007
View

Attack ChainAIDerived

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

  1. Access
    Compromise database server admin credentials
  2. Delivery
    Craft bytea response omitting mandatory hex prefix
  3. Exploit
    ECPG client receives malformed server data
  4. Execution
    Integer underflow in ECPG bytea parser
  5. Persist
    Uncontrolled out-of-bounds memory write
  6. Impact
    SIGSEGV crashes ECPG client process

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Integer underflow checks
Exploitation Conditions

Exploitation requires the attacker to hold database server administrator privileges on the PostgreSQL server to which the ECPG client connects - this is the primary hard prerequisite. The malicious server must return a bytea value that omits the mandatory '\x' prefix in its hex representation. The victim must be an application compiled with the ECPG preprocessor (ecpg) and linked against libecpg, actively querying bytea columns or parameters from the controlled server. What limits exploitation: (1) PR:H means the attacker must already control or fully compromise the PostgreSQL server, a high bar; (2) the write primitive uses data outside attacker knowledge, ruling out reliable code execution and limiting impact to crash or rare low-severity memory corruption; (3) ECPG is a niche client library - most PostgreSQL deployments do not use it, significantly reducing the exposed population; (4) scope is unchanged (S:U), so server processes and other clients on the same host are not directly affected.

Impact

The CVSS base score of 3.8 (Low) accurately reflects the constrained threat model. AV:N indicates the attack traverses the network (server-to-client), but PR:H - requiring database server administrator privileges - sharply limits the attacker population to those who already control or have fully compromised the PostgreSQL server instance. AC:L confirms no evasion technique is needed once those privileges exist. EPSS data is not supplied, but given the niche ECPG component, low CVSS, and absence of KEV listing or public exploit code, real-world exploitation probability is expected to be very low. The integrity impact (I:L) is rated low and described as rare, meaning most exploitation attempts simply crash the client rather than producing any useful write primitive. No conflict between CVSS signals and description is present. The primary real-world scenario is a rogue or compromised database server attacking a trusting ECPG client application - a threat relevant mainly to environments that cannot guarantee their PostgreSQL server is trustworthy (e.g., shared database hosting, compromised infrastructure). For organizations that fully control and trust their PostgreSQL servers, this vulnerability presents minimal incremental risk.

Exploit ScenarioDerived

A threat actor who has achieved database server administrator access (e.g., via credential theft, misconfigured pg_hba.conf, or supply-chain compromise of the server host) crafts a stored bytea value or a custom server response that omits the mandatory '\x' hex prefix. When a legitimate ECPG client application queries this value, the ECPG runtime's length calculation underflows, triggering a massive out-of-bounds memory write that terminates the client process with SIGSEGV, disrupting any application workflow dependent on that ECPG session. No public exploit code is known at time of analysis.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
Patch available 0.3% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Aug 13, 2026

Integer underflow in PostgreSQL's Embedded C preprocessor (ECPG) client allows a database server administrator to crash ECPG client applications by sending a specially crafted bytea value missing its mandatory prefix. Affected versions span all active PostgreSQL major release lines prior to 18.5, 17.11, 16.15, 15.19, and 14.24. The primary impact is temporary denial of service against the ECPG client process via SIGSEGV, with a rare secondary risk of low-severity client-side integrity corruption; no public exploit has been identified at time of analysis.

RemediationAI

Upgrade to the patched releases: PostgreSQL 14.24, 15.19, 16.15, 17.11, or 18.5, depending on the active major version in use. These versions fix the integer underflow in the ECPG bytea parser. Upgrade instructions and packages are available via https://www.postgresql.org/support/security/CVE-2026-16241/ and through standard distribution package managers. If immediate patching is not feasible, a targeted compensating control is to avoid connecting ECPG client applications to PostgreSQL servers not under full organizational control - the attack requires the server to send malformed bytea, so trust boundary enforcement between client and server is the key limiting factor. Additionally, running ECPG client processes under resource-limited service accounts with ulimits or under process supervisors that auto-restart on SIGSEGV can reduce availability impact in the interim. Rebuilding ECPG clients against a patched libecpg is required; a server-only upgrade is insufficient if client binaries are statically linked against the vulnerable library.

Affected VersionsENISA

PostgreSQL 17 <17.11
PostgreSQL 16 <16.15
PostgreSQL 15 <15.19
PostgreSQL 0 <14.24
PostgreSQL 18 <18.5

Affected Packages

euvd postgresql fix: 14.24, 15.19, 16.15, 17.11, 18.5

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

ECPG (Embedded C for PostgreSQL) is a preprocessor and runtime library that allows C programs to embed SQL statements and exchange data with a PostgreSQL server. The flaw (CWE-191, Integer Underflow) occurs in ECPG's parsing of bytea (binary data) values returned by the server. PostgreSQL's bytea hex format mandates the literal prefix '\x' before the hex-encoded payload. When a server administrator omits this prefix, the ECPG client's length or offset calculation wraps below zero, causing the client to attempt a memcpy or equivalent operation over an enormous, unintended memory region. The write source is data outside attacker knowledge or control (heap metadata, stack content, etc.), so the primitive is not exploitable for arbitrary code execution - it reliably produces SIGSEGV. Affected CPEs span all active branches: PostgreSQL 14.x before 14.24, 15.x before 15.19, 16.x before 16.15, 17.x before 17.11, and 18.x before 18.5.

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 (f86ef6dc-4d3a-42ad-8f28-e6d5547a5007) PRIMARY 3.8 LOW
AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:L/A:L
vuln.today AI 3.8 LOW

Server-to-client over network (AV:N), attacker must be DB server admin (PR:H), crash is primary outcome (A:L) with rare low integrity impact (I:L); no confidentiality exposure.

3.1 AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:L/A:L
4.0 AV:N/AC:L/AT:N/PR:H/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (f86ef6dc-4d3a-42ad-8f28-e6d5547a5007).

CVSS VectorVendor: f86ef6dc-4d3a-42ad-8f28-e6d5547a5007

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

Lifecycle Timeline

1
Patch available
Aug 13, 2026 - 14:02 EUVD

DescriptionCVE.org

Integer underflow in PostgreSQL ECPG allows a database server administrator to achieve temporary denial of service against the ECPG client via sending a bytea value lacking the mandatory prefix. The client overwrites a huge memory region with bytes outside attacker knowledge or control. This typically yields a simple SIGSEGV, but rare cases might achieve client-specific integrity impact via the write. Versions before PostgreSQL 18.5, 17.11, 16.15, 15.19, and 14.24 are affected.

Threat Intelligence Overview

EPSS Score
0.3%
Top 74% exploitable
Prevalence
Low
niche embedded-C SQL client, rare in modern PostgreSQL deployments
Data Quality
6 sources
Confidence: High

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 LOW
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.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· derived
Defer
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Low
Technical Impact
Partial

Priority Score

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

Attack Technique

Integer overflow occurs when an arithmetic operation produces a result that exceeds the maximum value a given integer type can store.

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

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

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