| From: | Noah Misch <noah(at)leadboat(dot)com> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: psql: Don't do backquote expansion in \unrestrict. |
| Date: | 2026-08-10 13:41:33 |
| Message-ID: | E1wtQFx-00000000yQK-3Uu7@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
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(at)gmail(dot)com>
Reported-by: Filip Janus <fjanus(at)redhat(dot)com>
Reported-by: Daniel Bakker <daniel(at)jackds(dot)nl>
Author: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Reviewed-by: Robert Haas <robertmhaas(at)gmail(dot)com>
Reviewed-by: Noah Misch <noah(at)leadboat(dot)com>
Security: CVE-2026-18408
Backpatch-through: 14
Branch
------
REL_14_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/2006fca401e07fc116a5d1777fc0f22bf49c9fae
Author: Nathan Bossart <nathan(at)postgresql(dot)org>
Modified Files
--------------
doc/src/sgml/ref/psql-ref.sgml | 5 +++++
src/bin/psql/command.c | 19 +++++++++++++++++--
2 files changed, 22 insertions(+), 2 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2026-08-10 16:15:44 | pgsql: Last-minute updates for release notes. |
| Previous Message | Noah Misch | 2026-08-10 13:41:32 | pgsql: psql: Don't do backquote expansion in \unrestrict. |