]> 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)
commitd389415ffad509f0de1342e6ebbb5d5c62dbedef
tree35ce4d8bd3761b7167003591c386f330d93793ad
parent6d6348f0329dd50ba9f954df28c2ffa88a15df07
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