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
A malicious server could inject psql meta-commands into plain-textdump output (i.e., scripts created with pg_dump --format=plain,pg_dumpall, or pg_restore --file) that are run at restore time onthe machine running psql. To fix, introduce a new "restricted"mode in psql that blocks all meta-commands (except for \unrestrictto exit the mode), and teach pg_dump, pg_dumpall, and pg_restore touse this mode in plain-text dumps.While at it, encourage users to only restore dumps generated fromtrusted servers or to inspect it beforehand, since restoring causesthe destination to execute arbitrary code of the source superusers'choice. However, the client running the dump and restore needn'ttrust the source or destination superusers.Reported-by: Martin RakhmanovReported-by: Matthieu Denais <litezeraw@gmail.com>Reported-by: RyotaK <ryotak.mail@gmail.com>Suggested-by: Tom Lane <tgl@sss.pgh.pa.us>Reviewed-by: Noah Misch <noah@leadboat.com>Reviewed-by: Michael Paquier <michael@paquier.xyz>Reviewed-by: Peter Eisentraut <peter@eisentraut.org>Security:CVE-2025-8714Backpatch-through: 13