Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCompromise database server admin credentials
-
DeliveryCraft bytea response omitting mandatory hex prefix
-
ExploitECPG client receives malformed server data
-
ExecutionInteger underflow in ECPG bytea parser
-
PersistUncontrolled out-of-bounds memory write
-
ImpactSIGSEGV 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
Affected Packages
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
AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:L/A:L
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.
Primary rating from Vendor (f86ef6dc-4d3a-42ad-8f28-e6d5547a5007).
CVSS VectorVendor: f86ef6dc-4d3a-42ad-8f28-e6d5547a5007
Lifecycle Timeline
1DescriptionCVE.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
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.
What every action level means
SSVC AssessmentENISA
Priority Score
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.
More in PostgreSQL
View allPostgreSQL libpq functions PQescapeLiteral(), PQescapeIdentifier(), PQescapeString(), and PQescapeStringConn() improperl
An issue was discovered in Appsmith before 1.52. Rated critical severity (CVSS 9.8), this vulnerability is remotely expl
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
Unauthenticated arbitrary file write in Splunk Enterprise (below 10.2.4 and 10.0.7) and Splunk Cloud Platform (below 10.
Unauthenticated SQL injection in Sangoma Switchvox SMB Edition 8.3 (build 104997) lets remote attackers execute arbitrar
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
The build_tablename function in pgsql.c in the PostgreSQL (aka pgsql) extension in PHP through 5.6.7 does not validate t
A vulnerability in the h2oai/h2o-3 REST API versions 3.46.0.4 allows unauthenticated remote attackers to execute arbitra
In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows superusers and users in the 'pg_execute_serve
Unauthenticated SQL injection in Vendure Shop API allows remote attackers to execute arbitrary SQL commands against the
Parse Server is an open source http web server backend. Rated critical severity (CVSS 10.0), this vulnerability is remot
Hard-coded default PostgreSQL credentials shipped in the docker-compose.yaml of langgenius Dify through version 1.5.1 al
EUVD-2026-57850
GHSA-v76f-gmv6-95jw
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB