| From: | Noah Misch <noah(at)leadboat(dot)com> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Fix SQL injection in logical replication origin checks. |
| Date: | 2026-05-11 12:19:38 |
| Message-ID: | E1wMPbm-0002XZ-1L@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Fix SQL injection in logical replication origin checks.
ALTER SUBSCRIPTION ... REFRESH PUBLICATION interpolates schema and
relation names into SQL without quoting them. A crafted subscriber
relation name can inject arbitrary SQL on the publisher. Test such a
name. Back-patch to v16, where commit
875693019053b8897ec3983e292acbb439b088c3 first appeared.
Reported-by: Pavel Kohout <pavel(dot)kohout(at)aisle(dot)com>
Author: Pavel Kohout <pavel(dot)kohout(at)aisle(dot)com>
Reviewed-by: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Backpatch-through: 16
Security: CVE-2026-6638
Branch
------
REL_17_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/f0f59b658ef10901c9af3af7705c802a72a0577e
Modified Files
--------------
src/backend/commands/subscriptioncmds.c | 9 +++++++--
src/test/subscription/t/030_origin.pl | 35 ++++++++++++++++++---------------
2 files changed, 26 insertions(+), 18 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Noah Misch | 2026-05-11 12:19:39 | pgsql: Check CREATE privilege on multirange type schema in CREATE TYPE. |
| Previous Message | Noah Misch | 2026-05-11 12:19:37 | pgsql: Harden our regex engine against integer overflow in size calcula |