Skip to main content

PostgreSQL CVE-2026-4427

HIGH
Improper Validation of Array Index (CWE-129)
2026-03-19 https://github.com/jackc/pgproto3 GHSA-x6gf-mpr2-68h6
7.5
CVSS 3.1 · GitHub Advisory
View

Attack ChainAIDerived

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

  1. Access
    Malicious PostgreSQL server sends DataRow message
  2. Exploit
    Negative field length bypasses validation
  3. Execution
    Slice bounds panic triggered
  4. Impact
    Denial of service occurs

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Array index validation
Exploitation Conditions

Requires network connection to a malicious or compromised PostgreSQL server that sends a crafted DataRow message with negative field length. Affects pgproto3 library clients connecting to untrusted PostgreSQL servers. No authentication or user interaction required.

Impact

Despite the high CVSS score of 7.5 indicating significant availability impact, real-world exploitation risk appears moderate based on multi-signal analysis. The CVSS vector (AV:N/AC:L/PR:N/UI:N) confirms remote exploitation with low complexity and no authentication required, making the vulnerability technically easy to exploit. However, the EPSS score of 0.07% at the 20th percentile indicates extremely low probability of active exploitation in the wild, and no KEV listing confirms this is not being actively exploited at scale. The attack requires the client to connect to a malicious or compromised PostgreSQL server, limiting the threat model to scenarios where attackers control the database server or perform man-in-the-middle attacks. No public exploit code is confirmed in the provided references, though detailed technical analysis exists from Security Infinity. This represents a supply chain risk for applications using pgproto3/pgx where database servers cannot be fully trusted, but is lower priority than vulnerabilities with confirmed exploitation or those affecting server-side components.

Exploit ScenarioDerived

An attacker controlling a PostgreSQL server or performing a man-in-the-middle attack on the database connection can send a crafted DataRow message containing a negative field length value when responding to client queries. The vulnerable pgproto3 client library processes this malicious message without proper validation, attempts to access a slice using the negative index, and crashes with a bounds-checking panic. This causes immediate denial of service to the application, requiring process restart and potentially disrupting business operations if the attack is repeated systematically.

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

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

Alert me

AnalysisAIv1 – Mar 20, 2026

PostgreSQL client applications using the pgproto3 Go library (github.com/jackc/pgproto3/v2) can be crashed remotely by malicious or compromised PostgreSQL servers sending specially crafted DataRow messages with negative field lengths, triggering slice bounds panics that result in denial of service. The vulnerability requires no authentication and has low attack complexity (CVSS:3.1/AV:N/AC:L/PR:N/UI:N), though the EPSS score of 0.07% (20th percentile) suggests minimal observed exploitation activity. Multiple detailed technical advisories exist including analysis from Security Infinity, and the issue is tracked in GitHub issue #2507 for the pgx project.

RemediationAI

Upgrade to a patched version of pgproto3/v2 as detailed in the vendor advisories at https://access.redhat.com/security/cve/CVE-2026-4427 and https://securityinfinity.com/research/memory-safety-vulnerabilities-in-go-postgresql-wire-protocol-parsers-pgproto3-pgx. Applications using the pgx driver should check their dependency tree and update to versions that incorporate the fix from https://github.com/jackc/pgx/issues/2507. Until patching is feasible, implement defense-in-depth measures including restricting database connections to only trusted PostgreSQL servers, using TLS with certificate pinning to prevent man-in-the-middle attacks, and deploying application-level monitoring to detect and restart crashed client processes. Network segmentation should ensure PostgreSQL servers are isolated from untrusted networks. Review the comprehensive vulnerability analysis at https://securityinfinity.com/research/memory-safety-vulnerabilities-in-go-postgresql-wire-protocol-parsers-pgproto3-pgx for additional technical context.

Affected Packages

go github.com/jackc/pgproto3/v2 no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in go

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

Technical ContextAI · show details

The vulnerability affects pgproto3, a Go library implementing the PostgreSQL wire protocol used by database clients to communicate with PostgreSQL servers. Per the CPE identifier (pkg:go/github.com_jackc_pgproto3_v2), the affected package is version 2 of the library. The root cause falls under CWE-129 (Improper Validation of Array Index), where the library fails to validate negative field length values in DataRow protocol messages before using them as slice indices. When a server sends a DataRow message containing a negative field length, the client attempts to read data using this unchecked value, causing a Go runtime panic due to out-of-bounds slice access. The PostgreSQL wire protocol is binary and defines message formats including DataRow for query result data, where field lengths are typically positive integers indicating byte counts.

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

GitHub Advisory PRIMARY 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
SUSE HIGH

Primary rating from GitHub Advisory.

CVSS VectorGitHub Advisory

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

DescriptionGitHub Advisory

A flaw was found in pgproto3. A malicious or compromised PostgreSQL server can exploit this by sending a DataRow message with a negative field length. This input validation vulnerability can lead to a denial of service (DoS) due to a slice bounds out of range panic.

Executive ViewAI

Why It Matters

Applications using the pgproto3 Go library (github.com/jackc/pgproto3/v2) are vulnerable to remote denial of service attacks from malicious PostgreSQL servers, requiring no authentication and enabling attackers to crash client applications through specially crafted messages. Organizations relying on PostgreSQL client connectivity in Go-based services face service availability risk until mitigation is implemented.

Business Impact: High
Compensating Controls

Network segmentation restricting PostgreSQL client connections to validated internal servers only; disable client-facing PostgreSQL connectivity where not operationally required; implement connection pooling with timeout and crash-recovery logic to limit DoS duration; monitor application logs for unexpected crashes correlated with database connections. No vendor-released patch identified at time of analysis-monitor upstream repositories for fix releases.

Threat Intelligence Overview

EPSS Score
0.1%
Top 80% exploitable
Threat Intel
1
1 source
Data Quality
5 sources
Confidence: Medium
NVD CVE.org EPSS GHSA Vendor GitHub 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.1%
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· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

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

Attack Technique

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.

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

Affected Products (CPE)GitHub Advisory

pkg:go/github.com_jackc_pgproto3_v2
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 Fixed
SUSE Linux Enterprise High Performance Computing 15 SP7 Fixed
SUSE Linux Enterprise Module for Basesystem 15 SP7 Fixed
SUSE Linux Enterprise Server 15 SP7 Fixed
SUSE Linux Enterprise Server 16.0 Fixed

References

Advisories & patches
ADVISORY https://access.redhat.com/errata/RHSA-2026:10126 ADVISORY https://access.redhat.com/errata/RHSA-2026:10130 ADVISORY https://access.redhat.com/errata/RHSA-2026:10131 ADVISORY https://access.redhat.com/errata/RHSA-2026:11856 ADVISORY https://access.redhat.com/errata/RHSA-2026:11916 ADVISORY https://access.redhat.com/errata/RHSA-2026:11996 ADVISORY https://access.redhat.com/errata/RHSA-2026:19375 ADVISORY https://access.redhat.com/errata/RHSA-2026:21017 ADVISORY https://access.redhat.com/errata/RHSA-2026:21769 ADVISORY https://access.redhat.com/errata/RHSA-2026:22347 ADVISORY https://access.redhat.com/errata/RHSA-2026:22450 ADVISORY https://access.redhat.com/errata/RHSA-2026:22465 ADVISORY https://access.redhat.com/errata/RHSA-2026:22714 ADVISORY https://access.redhat.com/errata/RHSA-2026:23345 ADVISORY https://access.redhat.com/errata/RHSA-2026:23361 ADVISORY https://access.redhat.com/errata/RHSA-2026:24853 ADVISORY https://access.redhat.com/errata/RHSA-2026:48085 ADVISORY https://access.redhat.com/security/cve/CVE-2026-4427 ADVISORY https://securityinfinity.com/research/memory-safety-vulnerabilities-in-go-postgresql-wire-protocol-parsers-pgproto3-pgx ADVISORY https://vuldb.com/?id.351716 REF https://bugzilla.redhat.com/show_bug.cgi?id=2448626 REF https://github.com/advisories/GHSA-x6gf-mpr2-68h6 REF https://github.com/golang/vulndb/issues/4518 REF https://github.com/jackc/pgproto3 REF https://github.com/jackc/pgx/issues/2507 REF https://nvd.nist.gov/vuln/detail/CVE-2026-4427

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