A type confusion vulnerability in PostgreSQL versions 18.0.0 through 18.6.x allows an object creator to execute arbitrary code as the operating system user running the database. This occurs due to incomplete type-cache invalidation when a composite type is changed while its cache entry is being populated. The issue is fixed in PostgreSQL 18.7.0.