An integer wraparound vulnerability in PostgreSQL generation memory contexts allows a database user to execute arbitrary code with the privileges of the operating system user running the database. This occurs by freeing a memory allocation larger than 1 GB and causing its block to be reused for smaller chunks, where the back-pointer offset cannot represent the correct position. The issue affects PostgreSQL major versions 16 through 18, specifically versions before 16.16, 17.12, and 18.7. Versions prior to 16 are not affected.