pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Reject substituting extension schemas or owners matching ["$'\]. 7+ messages / 1 participants [nested] [flat]
* pgsql: Reject substituting extension schemas or owners matching ["$'\]. @ 2023-08-07 13:07 Noah Misch <noah@leadboat.com> 0 siblings, 0 replies; 7+ messages in thread From: Noah Misch @ 2023-08-07 13:07 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Reject substituting extension schemas or owners matching ["$'\]. Substituting such values in extension scripts facilitated SQL injection when @extowner@, @extschema@, or @extschema:...@ appeared inside a quoting construct (dollar quoting, '', or ""). No bundled extension was vulnerable. Vulnerable uses do appear in a documentation example and in non-bundled extensions. Hence, the attack prerequisite was an administrator having installed files of a vulnerable, trusted, non-bundled extension. Subject to that prerequisite, this enabled an attacker having database-level CREATE privilege to execute arbitrary code as the bootstrap superuser. By blocking this attack in the core server, there's no need to modify individual extensions. Back-patch to v11 (all supported versions). Reported by Micah Gate, Valerie Woolard, Tim Carey-Smith, and Christoph Berg. Security: CVE-2023-39417 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/cd5f2a357014d5ed8205191f8e1fb180f1439599 Modified Files -------------- src/backend/commands/extension.c | 27 +++++++++++++++++ src/test/modules/test_extensions/Makefile | 2 ++ .../test_extensions/expected/test_extensions.out | 35 +++++++++++++++------- src/test/modules/test_extensions/meson.build | 2 ++ .../test_extensions/sql/test_extensions.sql | 20 ++++++++++--- .../test_extensions/test_ext_extschema--1.0.sql | 5 ++++ .../test_extensions/test_ext_extschema.control | 3 ++ 7 files changed, 79 insertions(+), 15 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Reject substituting extension schemas or owners matching ["$'\]. @ 2023-08-07 13:07 Noah Misch <noah@leadboat.com> 0 siblings, 0 replies; 7+ messages in thread From: Noah Misch @ 2023-08-07 13:07 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Reject substituting extension schemas or owners matching ["$'\]. Substituting such values in extension scripts facilitated SQL injection when @extowner@, @extschema@, or @extschema:...@ appeared inside a quoting construct (dollar quoting, '', or ""). No bundled extension was vulnerable. Vulnerable uses do appear in a documentation example and in non-bundled extensions. Hence, the attack prerequisite was an administrator having installed files of a vulnerable, trusted, non-bundled extension. Subject to that prerequisite, this enabled an attacker having database-level CREATE privilege to execute arbitrary code as the bootstrap superuser. By blocking this attack in the core server, there's no need to modify individual extensions. Back-patch to v11 (all supported versions). Reported by Micah Gate, Valerie Woolard, Tim Carey-Smith, and Christoph Berg. Security: CVE-2023-39417 Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/f53511010b72d7d314e22be7c63ef94792fee345 Modified Files -------------- src/backend/commands/extension.c | 27 +++++++++++++++++ src/test/modules/test_extensions/Makefile | 2 ++ .../test_extensions/expected/test_extensions.out | 35 +++++++++++++++------- src/test/modules/test_extensions/meson.build | 2 ++ .../test_extensions/sql/test_extensions.sql | 20 ++++++++++--- .../test_extensions/test_ext_extschema--1.0.sql | 5 ++++ .../test_extensions/test_ext_extschema.control | 3 ++ 7 files changed, 79 insertions(+), 15 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Reject substituting extension schemas or owners matching ["$'\]. @ 2023-08-07 13:07 Noah Misch <noah@leadboat.com> 0 siblings, 0 replies; 7+ messages in thread From: Noah Misch @ 2023-08-07 13:07 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Reject substituting extension schemas or owners matching ["$'\]. Substituting such values in extension scripts facilitated SQL injection when @extowner@, @extschema@, or @extschema:...@ appeared inside a quoting construct (dollar quoting, '', or ""). No bundled extension was vulnerable. Vulnerable uses do appear in a documentation example and in non-bundled extensions. Hence, the attack prerequisite was an administrator having installed files of a vulnerable, trusted, non-bundled extension. Subject to that prerequisite, this enabled an attacker having database-level CREATE privilege to execute arbitrary code as the bootstrap superuser. By blocking this attack in the core server, there's no need to modify individual extensions. Back-patch to v11 (all supported versions). Reported by Micah Gate, Valerie Woolard, Tim Carey-Smith, and Christoph Berg. Security: CVE-2023-39417 Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/de494ec14f6bd7f2676623a5934723a6c8ba51c2 Modified Files -------------- src/backend/commands/extension.c | 21 +++++++++++++++ src/test/modules/test_extensions/Makefile | 2 ++ .../test_extensions/expected/test_extensions.out | 30 ++++++++++++++-------- .../test_extensions/sql/test_extensions.sql | 17 +++++++++--- .../test_extensions/test_ext_extschema--1.0.sql | 5 ++++ .../test_extensions/test_ext_extschema.control | 3 +++ 6 files changed, 63 insertions(+), 15 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Reject substituting extension schemas or owners matching ["$'\]. @ 2023-08-07 13:07 Noah Misch <noah@leadboat.com> 0 siblings, 0 replies; 7+ messages in thread From: Noah Misch @ 2023-08-07 13:07 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Reject substituting extension schemas or owners matching ["$'\]. Substituting such values in extension scripts facilitated SQL injection when @extowner@, @extschema@, or @extschema:...@ appeared inside a quoting construct (dollar quoting, '', or ""). No bundled extension was vulnerable. Vulnerable uses do appear in a documentation example and in non-bundled extensions. Hence, the attack prerequisite was an administrator having installed files of a vulnerable, trusted, non-bundled extension. Subject to that prerequisite, this enabled an attacker having database-level CREATE privilege to execute arbitrary code as the bootstrap superuser. By blocking this attack in the core server, there's no need to modify individual extensions. Back-patch to v11 (all supported versions). Reported by Micah Gate, Valerie Woolard, Tim Carey-Smith, and Christoph Berg. Security: CVE-2023-39417 Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/d4648a74be07bfb23b449c722303c320297c0327 Modified Files -------------- src/backend/commands/extension.c | 21 +++++++++++++++ src/test/modules/test_extensions/Makefile | 2 ++ .../test_extensions/expected/test_extensions.out | 30 ++++++++++++++-------- .../test_extensions/sql/test_extensions.sql | 17 +++++++++--- .../test_extensions/test_ext_extschema--1.0.sql | 5 ++++ .../test_extensions/test_ext_extschema.control | 3 +++ 6 files changed, 63 insertions(+), 15 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Reject substituting extension schemas or owners matching ["$'\]. @ 2023-08-07 13:07 Noah Misch <noah@leadboat.com> 0 siblings, 0 replies; 7+ messages in thread From: Noah Misch @ 2023-08-07 13:07 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Reject substituting extension schemas or owners matching ["$'\]. Substituting such values in extension scripts facilitated SQL injection when @extowner@, @extschema@, or @extschema:...@ appeared inside a quoting construct (dollar quoting, '', or ""). No bundled extension was vulnerable. Vulnerable uses do appear in a documentation example and in non-bundled extensions. Hence, the attack prerequisite was an administrator having installed files of a vulnerable, trusted, non-bundled extension. Subject to that prerequisite, this enabled an attacker having database-level CREATE privilege to execute arbitrary code as the bootstrap superuser. By blocking this attack in the core server, there's no need to modify individual extensions. Back-patch to v11 (all supported versions). Reported by Micah Gate, Valerie Woolard, Tim Carey-Smith, and Christoph Berg. Security: CVE-2023-39417 Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/b1b585e0fc3dd195bc2e338c80760bede08de5f1 Modified Files -------------- src/backend/commands/extension.c | 21 +++++++++++++++ src/test/modules/test_extensions/Makefile | 2 ++ .../test_extensions/expected/test_extensions.out | 30 ++++++++++++++-------- .../test_extensions/sql/test_extensions.sql | 17 +++++++++--- .../test_extensions/test_ext_extschema--1.0.sql | 5 ++++ .../test_extensions/test_ext_extschema.control | 3 +++ 6 files changed, 63 insertions(+), 15 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Reject substituting extension schemas or owners matching ["$'\]. @ 2023-08-07 13:07 Noah Misch <noah@leadboat.com> 0 siblings, 0 replies; 7+ messages in thread From: Noah Misch @ 2023-08-07 13:07 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Reject substituting extension schemas or owners matching ["$'\]. Substituting such values in extension scripts facilitated SQL injection when @extowner@, @extschema@, or @extschema:...@ appeared inside a quoting construct (dollar quoting, '', or ""). No bundled extension was vulnerable. Vulnerable uses do appear in a documentation example and in non-bundled extensions. Hence, the attack prerequisite was an administrator having installed files of a vulnerable, trusted, non-bundled extension. Subject to that prerequisite, this enabled an attacker having database-level CREATE privilege to execute arbitrary code as the bootstrap superuser. By blocking this attack in the core server, there's no need to modify individual extensions. Back-patch to v11 (all supported versions). Reported by Micah Gate, Valerie Woolard, Tim Carey-Smith, and Christoph Berg. Security: CVE-2023-39417 Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/eb044d8f0aee1ba4950b0867f6ca9328374318db Modified Files -------------- src/backend/commands/extension.c | 16 ++++++++++++ src/test/modules/test_extensions/Makefile | 6 +++-- .../test_extensions/expected/test_extensions.out | 30 ++++++++++++++-------- .../test_extensions/sql/test_extensions.sql | 17 +++++++++--- .../test_extensions/test_ext_extschema--1.0.sql | 5 ++++ .../test_extensions/test_ext_extschema.control | 3 +++ 6 files changed, 60 insertions(+), 17 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Reject substituting extension schemas or owners matching ["$'\]. @ 2023-08-07 13:07 Noah Misch <noah@leadboat.com> 0 siblings, 0 replies; 7+ messages in thread From: Noah Misch @ 2023-08-07 13:07 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Reject substituting extension schemas or owners matching ["$'\]. Substituting such values in extension scripts facilitated SQL injection when @extowner@, @extschema@, or @extschema:...@ appeared inside a quoting construct (dollar quoting, '', or ""). No bundled extension was vulnerable. Vulnerable uses do appear in a documentation example and in non-bundled extensions. Hence, the attack prerequisite was an administrator having installed files of a vulnerable, trusted, non-bundled extension. Subject to that prerequisite, this enabled an attacker having database-level CREATE privilege to execute arbitrary code as the bootstrap superuser. By blocking this attack in the core server, there's no need to modify individual extensions. Back-patch to v11 (all supported versions). Reported by Micah Gate, Valerie Woolard, Tim Carey-Smith, and Christoph Berg. Security: CVE-2023-39417 Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/919ebb023e74546c6293352556365091c5402366 Modified Files -------------- src/backend/commands/extension.c | 16 ++++++++++++ src/test/modules/test_extensions/Makefile | 6 +++-- .../test_extensions/expected/test_extensions.out | 30 ++++++++++++++-------- .../test_extensions/sql/test_extensions.sql | 17 +++++++++--- .../test_extensions/test_ext_extschema--1.0.sql | 5 ++++ .../test_extensions/test_ext_extschema.control | 3 +++ 6 files changed, 60 insertions(+), 17 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2023-08-07 13:07 UTC | newest] Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2023-08-07 13:07 pgsql: Reject substituting extension schemas or owners matching ["$'\]. Noah Misch <noah@leadboat.com> 2023-08-07 13:07 pgsql: Reject substituting extension schemas or owners matching ["$'\]. Noah Misch <noah@leadboat.com> 2023-08-07 13:07 pgsql: Reject substituting extension schemas or owners matching ["$'\]. Noah Misch <noah@leadboat.com> 2023-08-07 13:07 pgsql: Reject substituting extension schemas or owners matching ["$'\]. Noah Misch <noah@leadboat.com> 2023-08-07 13:07 pgsql: Reject substituting extension schemas or owners matching ["$'\]. Noah Misch <noah@leadboat.com> 2023-08-07 13:07 pgsql: Reject substituting extension schemas or owners matching ["$'\]. Noah Misch <noah@leadboat.com> 2023-08-07 13:07 pgsql: Reject substituting extension schemas or owners matching ["$'\]. Noah Misch <noah@leadboat.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox