From: andrew.wheelwright@familysearch.org
To: pgsql-bugs@postgresql.org
Subject: BUG #14600: Passwords in user mappings leaked by psql \deu+ command
Date: Tue, 28 Mar 2017 05:38:14 +0000
Message-ID: <20170328053814.2690.5600@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
The following bug has been logged on the website:
Bug reference: 14600
Logged by: Andrew Wheelwright
Email address: andrew.wheelwright@familysearch.org
PostgreSQL version: 9.5.3
Operating system: CentOS 6.7
Description:
Scenario:
I'm working with a multi-server scenario where we have several classes of
user. For the sake of simplicity I'll call one class power_user and the
other standard_user. Also for the sake of simplicity, imagine the multiple
servers are called Alice, Bob, and Chuck.
The typical daily use case involve our standard users creating a foreign
table on Alice which references another table on Bob, copying said table
(e.g. create table as ...), dropping the foreign table to Bob, manipulating
data in the table on Alice (i.e. modifying millions of records), creating
another foreign table to Chuck, and copying the data from the table on Alice
to the table on Chuck before dropping both the foreign table and the local
table on Alice.
For our standard users to do their work, they must be able to create these
foreign tables (and no, they're not connecting to the same tables on Bob or
Chuck).
Now, the power_user role has more privileges than the standard_user role.
Specifically, the power_user has grants to other schemas on Alice and Chuck.
Both the power_user and the standard_user have usage granted on the foreign
servers Bob and Chuck.
The Problem:
If a standard user logs into Alice using command line client, psql, and runs
the command \deu+, the password for both the standard_user and the
power_user will be visible in the displayed user mapping. The user could
then log out of Alice and log back in as a power_user. As far as I can
determine, anyone with usage granted on the foreign server can see ALL
passwords for that foreign server's user mappings.
Note: querying the information schema for user mappings does not display
this same security vulnerability. It seems psql is getting the information
through some other means.
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
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-bugs@postgresql.org
Cc: andrew.wheelwright@familysearch.org
Subject: Re: BUG #14600: Passwords in user mappings leaked by psql \deu+ command
In-Reply-To: <20170328053814.2690.5600@wrigleys.postgresql.org>
References: <20170328053814.2690.5600@wrigleys.postgresql.org>
* 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