A use-after-free vulnerability in PostgreSQL's expanded-record domain checks allows an attacker with object creation privileges to execute arbitrary code as the database operating system user. This occurs through repeated domain checks on a composite type that reuse a dangling memory-context pointer. Versions prior to PostgreSQL 14.25, 15.20, 16.16, 17.12, and 18.7 are affected.