pgsql: Reject more unsafe names in extension script substitutions.

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

pgsql: Reject more unsafe names in extension script substitutions.

От:
Noah Misch <noah@leadboat.com>
Дата:
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 
Reported-by: Aaron Chen 
Author: Nathan Bossart 
Reviewed-by: Tom Lane 
Reviewed-by: Greg Burd 
Security: CVE-2026-120153
Backpatch-through: 14

Branch
------
REL_19_STABLE

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

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(-)

FAQ