Description
Heap buffer overflow in PostgreSQL pg_stat_statements allows the query author to execute arbitrary code as the operating system user running the database, via crafted queries containing array constants. Within major version 18, minor versions before PostgreSQL 18.5 are affected. Versions before PostgreSQL 18 are unaffected.
Published: 2026-08-13
Score: 8.8 High
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Heap buffer overflow in PostgreSQL's pg_stat_statements extension allows a query author to execute arbitrary code as the operating system user that runs the database. The flaw is triggered by crafted SQL query strings that contain array constants, overflowing a heap buffer (CWE‑122). If exploited, the attacker can gain full control over the database server and potentially the underlying system, compromising confidentiality, integrity, and availability of all data stored in the instance.

Affected Systems

The vulnerability affects PostgreSQL major version 18, specifically minor releases prior to 18.5. Versions before PostgreSQL 18 are not affected. Thus any deployment running PostgreSQL 18.0 through 18.4 remains at risk.

Risk and Exploitability

The CVSS score of 8.8 indicates high severity, and the lack of an EPSS score means current exploitation probability is unknown, but the issue is not yet listed in CISA KEV. The likely attack vector involves an attacker who can submit SQL queries containing the trigger payload; this could occur through a privileged client application or through any interface that permits executing arbitrary statements against the database.

Generated by OpenCVE AI on August 13, 2026 at 14:43 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade PostgreSQL to version 18.5 or later to apply the vendor patch that fixes the heap buffer overflow.
  • If the upgrade cannot be performed immediately, disable or drop the pg_stat_statements extension on the affected database instances to eliminate the vulnerable code path.
  • Restrict use of pg_stat_statements and arbitrary query execution to trusted users only, and apply the principle of least privilege to database roles.

Generated by OpenCVE AI on August 13, 2026 at 14:43 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 13 Aug 2026 15:00:00 +0000

Type Values Removed Values Added
First Time appeared Postgresql
Postgresql postgresql
Vendors & Products Postgresql
Postgresql postgresql

Thu, 13 Aug 2026 13:15:00 +0000

Type Values Removed Values Added
Description Heap buffer overflow in PostgreSQL pg_stat_statements allows the query author to execute arbitrary code as the operating system user running the database, via crafted queries containing array constants. Within major version 18, minor versions before PostgreSQL 18.5 are affected. Versions before PostgreSQL 18 are unaffected.
Title PostgreSQL pg_stat_statements heap buffer overflow executes arbitrary code
Weaknesses CWE-122
References
Metrics cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}


Subscriptions

Postgresql Postgresql
cve-icon MITRE

Status: PUBLISHED

Assigner: PostgreSQL

Published:

Updated: 2026-08-13T15:36:25.900Z

Reserved: 2026-07-03T20:28:16.168Z

Link: CVE-2026-14676

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-13T13:17:44.907

Modified: 2026-08-13T13:17:44.907

Link: CVE-2026-14676

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-13T14:45:03Z

Weaknesses
  • CWE-122

    Heap-based Buffer Overflow