You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
In extensions, don't replace objects not belonging to the extension.
Previously, if an extension script did CREATE OR REPLACE and there wasan existing object not belonging to the extension, it would overwritethe object and adopt it into the extension. This is problematic, firstbecause the overwrite is probably unintentional, and second because wedidn't change the object's ownership. Thus a hostile user could createan object in advance of an expected CREATE EXTENSION command, and wouldthen have ownership rights on an extension object, which could bemodified for trojan-horse-type attacks.Hence, forbid CREATE OR REPLACE of an existing object unless it alreadybelongs to the extension. (Note that we've always forbidden replacingan object that belongs to some other extension; only the behavior forpreviously-free-standing objects changes here.)For the same reason, also fail CREATE IF NOT EXISTS when there isan existing object that doesn't belong to the extension.Our thanks to Sven Klemm for reporting this problem.Security:CVE-2022-2625