Bug #2121
closedUnauthenticated YAML fact and reports importers can be exploited
Description
The Rails vulnerability CVE-2013-0156 has made us realise there's a very similar issue in Foreman itself where it parses untrusted YAML input.
The facts and reports importers are used by puppetmasters to send YAML to Foreman, which is imported straight from Puppet and without any
authentication (since the puppetmaster has no credentials). An attacker can use this YAML loading to exploit Foreman.
We're proposing to lock this down so that only hosts with registered smart proxies on (with the Puppet feature) are able to upload data.
In addition, we would recommend (and implement in foreman-installer) enabling optional client SSL cert verification in mod_ssl, then enforce
the smart proxy check using the client certificate's CN. The report and ENC scripts would change to use the puppetmaster's SSL cert during HTTPS calls to Foreman.
Both the host check and the enhanced HTTPS check would have settings so they can be disabled. They'd be enabled by default in 1.1, but if
there's demand for a backport to 1.0 then they'd be disabled for compatibility.
This would also address the issue raised by Andreas Rogge (thank you for the report) where ENC output, including hashed root passwords, is
accessible to any host: #2069
In the meantime, if you're concerned about the security of your Foreman host then you could restrict access via Apache, if you use it. e.g.
<Location ~ "/(fact_values|reports)/create"> Order Deny,Allow Deny from all Allow from puppetmaster.example.net </Location>
(from http://groups.google.com/group/foreman-users/browse_thread/thread/fe39ca595e1f03db)
Updated by Dominic Cleal about 12 years ago
- Status changed from New to Assigned
- Assignee set to Dominic Cleal
Updated by Dominic Cleal about 12 years ago
- Status changed from Assigned to Ready For Testing
Two PRs submitted:
https://github.com/theforeman/foreman/pull/373 restricts access to the puppetmaster interfaces to prevent unauthed imports (CVE-2013-0171)
https://github.com/theforeman/puppet-foreman/pull/34 to support restricted access
(linked to #2069)
Updated by Dominic Cleal about 12 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 358ec5a3a1b59c098b5c14fcd7a90ca1a6a5dccd.
Updated by Dominic Cleal almost 12 years ago
For users updating and hitting this change, please see the following documentation:
We appreciate it's a difficult change, but is necessary to improve the security of the application. If you have problems, do check the troubleshooting text in the manual, and do contact one of the Support channels.
Updated by Dominic Cleal over 10 years ago
- Related to Feature #5914: Allow a host to upload its own facts and reports - Support masterless Puppet added