From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Bryn Llewellyn <bryn@yugabyte.com>
To: Jeremy Smith <jeremy@musicsmith.net>
Cc: pgsql-general list <pgsql-general@lists.postgresql.org>
Subject: Re: What happened to the tip "It is good practice to create a role that has the CREATEDB and CREATEROLE privileges..."
Date: Thu, 20 Apr 2023 09:11:31 +0200
Message-ID: <db2c7c3e0c065ca89bb9664b3f6e01cef4f6de8a.camel@cybertec.at> (raw)
In-Reply-To: <67321D1A-9C90-42A5-A0D8-4A1C37EA4568@yugabyte.com>
References: <DEFDC682-5BE8-4406-843A-E294C917D6BC@yugabyte.com>
<CAM8SmLWK62C+jvA-Lg=ba9hsz6XXRN-cR6QHM_CWEbV5QCft-g@mail.gmail.com>
<67321D1A-9C90-42A5-A0D8-4A1C37EA4568@yugabyte.com>
On Wed, 2023-04-19 at 16:53 -0700, Bryn Llewellyn wrote:
>
> I do see that a role that hasĀ "createdb" and "createrole" is pretty powerful because,
> for example, a role with these attributes can use "set role" to become any other non-superuser
> (see the example below).
A user with CREATEROLE can make herself a member of "pg_execute_server_program", which
in turn allows a clever attacker on a normal installation to make herself superuser.
Yours,
Laurenz Albe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: laurenz.albe@cybertec.at, bryn@yugabyte.com, jeremy@musicsmith.net
Subject: Re: What happened to the tip "It is good practice to create a role that has the CREATEDB and CREATEROLE privileges..."
In-Reply-To: <db2c7c3e0c065ca89bb9664b3f6e01cef4f6de8a.camel@cybertec.at>
References: <DEFDC682-5BE8-4406-843A-E294C917D6BC@yugabyte.com> <CAM8SmLWK62C+jvA-Lg=ba9hsz6XXRN-cR6QHM_CWEbV5QCft-g@mail.gmail.com> <67321D1A-9C90-42A5-A0D8-4A1C37EA4568@yugabyte.com> <db2c7c3e0c065ca89bb9664b3f6e01cef4f6de8a.camel@cybertec.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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