Bug 1448089 (CVE-2017-7486) - CVE-2017-7486 postgresql: pg_user_mappings view discloses foreign server passwords
Summary: CVE-2017-7486 postgresql: pg_user_mappings view discloses foreign server pass...
Status: NEW
Alias: CVE-2017-7486
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard: impact=moderate,public=20170511,repor...
Keywords: Security
Depends On: 1450116 1449699 1449700 1449701 1449702 1449703 1449704 1449705 1449706 1450115 1450117 1469544 1469545
Blocks: 1415638 1448091
TreeView+ depends on / blocked
 
Reported: 2017-05-04 13:52 UTC by Adam Mariš
Modified: 2019-01-02 22:42 UTC (History)
27 users (show)

(edit)
It was found that the pg_user_mappings view could disclose information about user mappings to a foreign database to non-administrative database users. A database user with USAGE privilege for this mapping could, when querying the view, obtain user mapping data, such as the username and password used to connect to the foreign database.
Clone Of:
(edit)
Last Closed:


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:1677 normal SHIPPED_LIVE Moderate: rh-postgresql95-postgresql security update 2017-07-05 09:44:17 UTC
Red Hat Product Errata RHSA-2017:1678 normal SHIPPED_LIVE Moderate: rh-postgresql94-postgresql security update 2017-07-05 09:54:19 UTC
Red Hat Product Errata RHSA-2017:1838 normal SHIPPED_LIVE Moderate: rh-postgresql95-postgresql security update 2017-07-31 19:52:01 UTC
Red Hat Product Errata RHSA-2017:1983 normal SHIPPED_LIVE Moderate: postgresql security and enhancement update 2017-08-01 18:31:18 UTC
Red Hat Product Errata RHSA-2017:2425 normal SHIPPED_LIVE Moderate: rh-postgresql95-postgresql security update 2017-08-07 20:11:22 UTC

Description Adam Mariš 2017-05-04 13:52:54 UTC
A typical CREATE USER MAPPING command persists a foreign password in an "option" of the user mapping. Contrary to its documentation and at variance with the information_schema.user_mapping_options view, the pg_user_mappings view discloses user mapping options to any user having USAGE privilege on the associated foreign server. If someone revokes the USAGE grant, an attacker having captured the password this way might use it to connect another way. An attacker may use the password to run arbitrary queries against the server or others accepting the same credentials, not just the limited queries one can issue via foreign tables.

Affected versions: 8.4 - 9.6

Comment 1 Adam Mariš 2017-05-04 13:53:13 UTC
Acknowledgments:

Name: the PostgreSQL project
Upstream: Andrew Wheelwright

Comment 2 Cedric Buissart 🐶 2017-05-09 12:10:42 UTC
Upstream patch : 
 * Match pg_user_mappings limits to information_schema.user_mapping_options
https://github.com/postgres/postgres/commit/3eefc51053f

Comment 4 Adam Mariš 2017-05-11 14:38:56 UTC
External References:

https://www.postgresql.org/about/news/1746/

Comment 5 Adam Mariš 2017-05-11 14:47:36 UTC
Created mingw-postgresql tracking bugs for this issue:

Affects: epel-7 [bug 1450116]
Affects: fedora-all [bug 1450117]


Created postgresql tracking bugs for this issue:

Affects: fedora-all [bug 1450115]

Comment 8 errata-xmlrpc 2017-07-05 05:45:38 UTC
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 6
  Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.3 EUS

Via RHSA-2017:1677 https://access.redhat.com/errata/RHSA-2017:1677

Comment 9 errata-xmlrpc 2017-07-05 05:55:38 UTC
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 6
  Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.3 EUS

Via RHSA-2017:1678 https://access.redhat.com/errata/RHSA-2017:1678

Comment 11 errata-xmlrpc 2017-07-31 15:53:09 UTC
This issue has been addressed in the following products:

  Red Hat Satellite 5.8
  Red Hat Satellite 5.8 ELS

Via RHSA-2017:1838 https://access.redhat.com/errata/RHSA-2017:1838

Comment 12 errata-xmlrpc 2017-08-01 20:45:41 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2017:1983 https://access.redhat.com/errata/RHSA-2017:1983

Comment 13 errata-xmlrpc 2017-08-07 16:13:12 UTC
This issue has been addressed in the following products:

  Red Hat Satellite 5.7

Via RHSA-2017:2425 https://access.redhat.com/errata/RHSA-2017:2425


Note You need to log in before you can comment on or make changes to this bug.