A heap-based buffer overflow vulnerability exists in the PostgreSQL tsvector_delete() function. This flaw allows a database user to execute arbitrary code with the privileges of the operating system user running the database. The issue arises when processing a tsvector whose lexeme data uses a nonstandard but valid ordering that requires additional alignment padding. Versions prior to PostgreSQL 14.25, 15.20, 16.16, 17.12, and 18.7 are affected. A patch is available in these fixed versions.