PostgreSQL pg_stat_statements Extension Heap-based Buffer Overflow Remote Code Execution Vulnerability

November 13th, 2026

Vulnerability Details

This vulnerability allows remote attackers to execute arbitrary code on affected installations of PostgreSQL. Authentication is required to exploit this vulnerability.

The specific flaw exists within the processing of query normalizations. The issue results from the lack of proper validation of the length of user-supplied data prior to copying it to a heap-based buffer. An attacker can leverage this vulnerability to execute code in the context of the service account.

Additional Details

PostgreSQL has issued an update to correct this vulnerability. More details can be found at:
https://github.com/postgres/postgres/commit/1e2795ddeafc66cd78d2c90a69dd820488639c7c

Disclosure Timeline

  • 2026-05-21 - Vulnerability reported to vendor
  • 2026-11-13 - Coordinated public release of advisory
  • 2026-11-13 - Advisory Updated

Credit

Sajeeb Lohani

Back to Advisories