Bug #11579
closedCVE-2015-5233 - reports show/destroy not restricted by host authorization
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 foreman-security@googlegroups.com.
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).
Updated by Daniel Lobato Garcia over 9 years ago
- Assignee set to Daniel Lobato Garcia
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 (
)
Updated by Dominic Cleal over 9 years ago
- Translation missing: en.field_release changed from 72 to 84
Updated by Daniel Lobato Garcia over 9 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 293036dfa71ae70624663647f1ef70798bf53d3e.