An uncontrolled search path element issue exists. When refreshing an IMMV, pg ivm executes functions without specifying schema names, potentially allowing it to be tricked into executing unexpected functions from other schemas with the IMMV owner's privilege. If exploited, an attacker-provided function may be executed with the materialized view owner's privilege.