tenderlove reports: DoS Vulnerability in authenticate_or_request_with_http_digest There is a DoS vulnerability in Action Pack digest authentication handling in Rails. This vulnerability has been assigned the CVE identifier CVE-2012-3424. Versions Affected: 3.x. Not affected: 2.3.5 - 2.3.14 Fixed Versions: 3.0.16, 3.1.7, 3.2.7 Impact ------ All users using Digest Authentication support in Rails should upgrade immediately. Impacted code uses any of the `with_http_digest` controller helper methods. For example: class MyController < ApplicationController def index authenticate_or_request_with_http_digest(REALM) do |uname| # ... end end end Releases -------- The 3.0.16, 3.1.7 & 3.2.7 releases are available at the normal locations. Workarounds ----------- There are no feasible workarounds for this issue. Patches ------- To aid users who aren't able to upgrade immediately we have provided patches for the two supported release series. They are in git-am format and consist of a single changeset. * 3-0-digest_auth_dos.patch - Patch for 3.0 series * 3-1-digest_auth_dos.patch - Patch for 3.1 series * 3-2-digest_auth_dos.patch - Patch for 3.2 series Please note that only the 3.1.x and 3.2.x series are supported at present. Users of earlier unsupported releases are advised to upgrade as soon as possible as we cannot guarantee the continued availability of security fixes for unsupported releases. Credits ------- Thanks to Charlie Somerville for reporting this issue! References: http://weblog.rubyonrails.org/2012/7/26/ann-rails-3-2-7-has-been-released/ https://groups.google.com/forum/?fromgroups#!topic/rubyonrails-security/vxJjrc15qYM diff --git a/actionpack/lib/action_controller/metal/http_authentication.rb b/actionpack/lib/action_controller/metal/http_authentication.rb index 9f2f547..fe4ab65 100644 --- a/actionpack/lib/action_controller/metal/http_authentication.rb +++ b/actionpack/lib/action_controller/metal/http_authentication.rb @@ -227,9 +227,9 @@ module ActionController end def decode_credentials(header) - Hash[header.to_s.gsub(/^Digest\s+/,'').split(',').map do |pair| + HashWithIndifferentAccess[header.to_s.gsub(/^Digest\s+/,'').split(',').map do |pair| key, value = pair.split('=', 2) - [key.strip.to_sym, value.to_s.gsub(/^"|"$/,'').gsub(/'/, '')] + [key.strip, value.to_s.gsub(/^"|"$/,'').delete('\'')] end] end
Created rubygem-rails tracking bugs for this issue Affects: fedora-all [bug 843913]
Created rubygem-rails tracking bugs for this issue Affects: epel-5 [bug 843924]
rubygem-actionpack-3.0.11-6.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.
rubygem-actionpack-3.0.10-8.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.
This issue has been addressed in following products: CloudForms for RHEL 6 Via RHSA-2012:1542 https://rhn.redhat.com/errata/RHSA-2012-1542.html
ruby193-rubygem-actionpack-3.2.8-1.el6.noarch is installed in OpenShift and used by the broker, site and ruby 1.9 applications.
Closing, fixed in OpenShift and CloudForms
This issue has been addressed in following products: Red Hat Subscription Asset Manager 1.1 Via RHSA-2013:0154 https://rhn.redhat.com/errata/RHSA-2013-0154.html
This issue has been addressed in following products: RHEL 6 Version of OpenShift Enterprise Via RHSA-2013:0582 https://rhn.redhat.com/errata/RHSA-2013-0582.html