| From: | Noah Misch <noah(at)leadboat(dot)com> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Reject more unsafe names in extension script substitutions. |
| Date: | 2026-11-09 14:21:49 |
| Message-ID: | E1xQQFp-000000003Ih-24CO@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Reject more unsafe names in extension script substitutions.
Commit cd5f2a3570 rejected schema and owner names containing
quotes, backslashes, and dollar signs, but names containing
newlines, carriage returns, comment delimiters, or the substitution
tokens themselves can still achieve SQL injection. To fix, reject
those names, too.
Reported-by: Anthropic OSS program
Reported-by: Sven Klemm <sven(at)tigerdata(dot)com>
Reported-by: Aaron Chen <chenyoulong20g(at)ict(dot)ac(dot)cn>
Author: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Reviewed-by: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Reviewed-by: Greg Burd <greg(at)burd(dot)me>
Security: CVE-2026-120153
Backpatch-through: 14
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/f475710183f9d34525c9acf97b19f749b980d355
Author: Nathan Bossart <nathan(at)postgresql(dot)org>
Modified Files
--------------
src/backend/commands/extension.c | 91 ++++++++++++++++------
.../test_extensions/expected/test_extensions.out | 23 ++++++
.../test_extensions/sql/test_extensions.sql | 16 ++++
3 files changed, 105 insertions(+), 25 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Noah Misch | 2026-11-09 14:21:50 | pgsql: Teach equalRowTypes() to safely handle dropped columns. |
| Previous Message | Noah Misch | 2026-11-09 14:21:48 | pgsql: Fix potential buffer overrun in ts_rank_cd(). |