Use after free in PostgreSQL pltcl allows an object creator to execute arbitrary code as the operating system user running the database, via a domain CHECK that re-enters the Tcl interpreter and frees or changes a string still used by the outer result conversion. Versions before PostgreSQL 18.7, 17.12, 16.16, 15.20, and 14.25 are affected.
Attacker has permission to "CREATE EXTENSION pltcl", or another user previously issued that. Attacker has permission to create objects (temporary objects or non-temporary objects in at least one schema).