CVE-2026-14676

PostgreSQL pg_stat_statements heap buffer overflow executes arbitrary code

Published Aug 13, 2026 CVSS 3.1 · 8.8 High EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical 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.

Remediation

No solution or workaround provided in the CVE record.

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
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.
Type Values Removed Values Added
CPEs cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:*
Type Values Removed Values Added
Metrics ssvc

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

Type Values Removed Values Added
First Time appeared Postgresql
Postgresql postgresql
Vendors & Products Postgresql
Postgresql postgresql
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'}

Weaknesses
  • CWE-122

    Heap-based Buffer Overflow

Sources

Status
PUBLISHED
Assigner
PostgreSQL
Published
Updated
Aug 29, 2026, 11:07 PM
Reserved
Jul 3, 2026, 8:28 PM
Status
Modified
Published
Aug 13, 2026, 1:17 PM
Modified
Aug 29, 2026, 11:17 PM