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.6 are affected. Versions before PostgreSQL 18 are unaffected.
Published: 2026-08-13
Score: 8.8 High
EPSS: < 1% Very Low
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 queries containing array constants, causing a heap buffer overflow (CWE‑122). All minor releases of PostgreSQL 18 before 18.6 are affected, while earlier major releases are safe. An attacker who can submit such queries can gain full control of 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 before 18.6. Versions before PostgreSQL 18 are not affected. Any deployment running PostgreSQL 18.0 through 18.5 remains at risk.

Risk and Exploitability

The CVSS score of 8.8 indicates high severity, and the EPSS score of <1% suggests a very low but non‑zero likelihood of exploitation; the vulnerability is not listed in the CISA KEV catalog. 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 30, 2026 at 01:23 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade PostgreSQL to version 18.6 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 30, 2026 at 01:23 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Ubuntu USN Ubuntu USN USN-8653-1 PostgreSQL vulnerabilities
History

Sat, 29 Aug 2026 23: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. 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.6 are affected. Versions before PostgreSQL 18 are unaffected.

Wed, 19 Aug 2026 01:30:00 +0000

Type Values Removed Values Added
CPEs cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:*

Thu, 13 Aug 2026 16:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


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-29T23:07:19.805Z

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

Link: CVE-2026-14676

cve-icon Vulnrichment

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

cve-icon NVD

Status : Modified

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

Modified: 2026-08-29T23:17:15.423

Link: CVE-2026-14676

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-30T01:30:17Z

Weaknesses
  • CWE-122

    Heap-based Buffer Overflow