]> git.ipfire.org Git - thirdparty/postgresql.git/commit
pg_createsubscriber: Obstruct SQL injection via subscription names.
authorNathan Bossart <nathan@postgresql.org>
Mon, 11 May 2026 12:13:47 +0000 (05:13 -0700)
committerNoah Misch <noah@leadboat.com>
Mon, 11 May 2026 12:13:47 +0000 (05:13 -0700)
commitc2e44c370edc003367e94bde137c6d9cfab5919c
treedf6c01a764be8a4615f164b7e486e451c775e42b
parent661095c40c0bcbb9c49743f518417a2977b63aef
pg_createsubscriber: Obstruct SQL injection via subscription names.

drop_existing_subscription() neglected to escape the subscription
name when generating its query string.  To fix, use
PQescapeIdentifier() to construct a properly escaped name, and use
it in the ALTER SUBSCRIPTION and DROP SUBSCRIPTION commands.

Reported-by: Yu Kunpeng <yu443940816@live.com>
Author: Nathan Bossart <nathandbossart@gmail.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Security: CVE-2026-6476
Backpatch-through: 17
src/bin/pg_basebackup/pg_createsubscriber.c