pgsql: psql: Don't do backquote expansion in \unrestrict.

Поиск
Список
Период
Сортировка
Искать

pgsql: psql: Don't do backquote expansion in \unrestrict.

От:
Noah Misch <noah@leadboat.com>
Дата:
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 
Reported-by: Filip Janus 
Reported-by: Daniel Bakker 
Author: Nathan Bossart 
Reviewed-by: Robert Haas 
Reviewed-by: Noah Misch 
Security: CVE-2026-18408
Backpatch-through: 14

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/0bfac9e1f946e098b1f61a642e71bb4844757472
Author: Nathan Bossart 

Modified Files
--------------
doc/src/sgml/ref/psql-ref.sgml |  5 +++++
src/bin/psql/command.c         | 10 ++++++++--
src/bin/psql/t/001_basic.pl    |  7 +++++++
3 files changed, 20 insertions(+), 2 deletions(-)

FAQ