Project

General

Profile

Actions

Bug #11579

closed

CVE-2015-5233 - reports show/destroy not restricted by host authorization

Added by Dominic Cleal over 9 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
High
Category:
Security
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Foreman 1.5.0 or higher are vulnerable to an authorization issue that allows users to view and delete reports for hosts that they don't have access to.

Reports (from tools such as Puppet) are stored in Foreman and associated to the host they came from. Users can be granted permissions to view and/or destroy reports, and also separate permissions to view certain hosts. The UI and API only list reports where the user has permission to view both reports and the host it was from.

The security issue is that both the show and destroy actions for viewing and deleting individual reports do not limit access to the hosts that the user has permission to view. A user with permission to view or destroy reports can do so for any host if they know the ID, or can easily view the last report for a given host.

Thanks to Daniel Lobato Garcia of Red Hat for reporting this to .

Actions #1

Updated by Dominic Cleal over 9 years ago

It looks like this extends to both the regular #show and #destroy behaviour on the UI and API controllers, which would allow somebody with *_reports permission but not the associated host to view or destroy a report.

I think the vulnerable locations are:

1. ReportsController#show, #destroy - allowing viewing and deletion of reports for users with the appropriate *_reports permission but not the appropriate view_hosts permission. (Not just "last".)

2. API ReportsController#show, #destroy - ditto, but I think the #last method is safe as it uses Report.my_reports.

The authorisation here is complex and two-fold, as it's both using .authorized and .my_reports to limit based on both reports and host permissions (inc taxonomies).

Actions #2

Updated by Dominic Cleal over 9 years ago

  • Description updated (diff)
Actions #3

Updated by Daniel Lobato Garcia over 9 years ago

  • Assignee set to Daniel Lobato Garcia
Actions #4

Updated by The Foreman Bot over 9 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/2644 added
  • Pull request deleted ()
Actions #5

Updated by Dominic Cleal over 9 years ago

  • Translation missing: en.field_release changed from 72 to 84
Actions #6

Updated by Daniel Lobato Garcia over 9 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #7

Updated by Bryan Kearney over 9 years ago

  • Bugzilla link set to 1263741
Actions

Also available in: Atom PDF