A heap buffer overflow vulnerability exists in PostgreSQL's pg_stat_statements module that allows a query author to execute arbitrary code as the operating system user running the database. This issue affects PostgreSQL major version 18, specifically versions from 18.0 up to but not including 18.5. Versions prior to 18.0 are not affected. A patch is available to address this vulnerability.