mirror of
https://github.com/postgres/postgres.git
synced 2026-10-23 13:29:09 +03:00
psql: Don't do backquote expansion in \unrestrict.
This oversight in commit 71ea0d6795 allows a malicious server to
inject shell commands into plain-text dump output that are run at
restore time on the machine running psql. To fix, interpret all
text after \unrestrict until the end of the line as its argument.
Reported-by: Lucas Velgus <velgusgus599@gmail.com>
Reported-by: Filip Janus <fjanus@redhat.com>
Reported-by: Daniel Bakker <daniel@jackds.nl>
Author: Nathan Bossart <nathandbossart@gmail.com>
Reviewed-by: Robert Haas <robertmhaas@gmail.com>
Reviewed-by: Noah Misch <noah@leadboat.com>
Security: CVE-2026-18408
Backpatch-through: 14
This commit is contained in:
committed by
Noah Misch
parent
e2c48c81fc
commit
2006fca401
@@ -3397,6 +3397,11 @@ testdb=> <userinput>\setenv LESS -imx4F</userinput>
|
||||
<application>pg_dumpall</application>, and
|
||||
<application>pg_restore</application>, but it may be useful elsewhere.
|
||||
</para>
|
||||
<para>
|
||||
Unlike most other meta-commands, the entire remainder of the line is
|
||||
always taken to be the argument of <command>\unrestrict</command>, and
|
||||
neither variable interpolation nor backquote expansion are performed.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user