Bugzilla – Bug 926396
VUL-1: CVE-2015-1820: rubygem-rest-client: ruby rest-client session fixation vulnerability
Last modified: 2020-03-20 16:20:47 UTC
via oss-sec From: Andy Brody <andy@abrody.com> Date: Mon, 23 Mar 2015 21:33:04 -0700 Subject: [oss-security] CVE-2015-1820: ruby rest-client session fixation vulnerability Following the very similar vulnerability in python-requests (CVE-2015-2296), the rest-client team discovered a vulnerability which has now been fixed in rest-client 1.8.0. https://rubygems.org/gems/rest-client/versions/1.8.0 https://github.com/rest-client/rest-client/issues/369 The problematic behavior was introduced in rest-client 1.6.1: any Set-Cookie headers present in an HTTP 30x redirection response are blindly sent to the redirection target, regardless of domain, path, expiration, or secure cookie settings. All subsequent 1.6.x and 1.7.x releases are affected. Similarly to the issue with python-requests, the issue could be exploited in the following ways: - If you are the redirection source (i.e. you can make rest-client hit your URL), you can make rest-client perform a request to any third-party domain with cookies of your choosing. This may be useful in performing a session fixation attack. - If you are the redirection target (i.e. you can make a third-party site redirect to your URL), you can steal any cookies set by the third-party redirection. This issue has been assigned CVE-2015-1820. Cheers, Andy
bugbot adjusting priority
Bernhard: would you have time for these security updates? Or would you like someone else to help?
The fix seems to be https://github.com/rest-client/rest-client/pull/365 but it did not apply cleanly to our 1.6.7 version so I used git to cherry-pick the 3 commits onto it https://build.suse.de/request/show/88896 needs careful testing if nothing broke
well, + s.add_dependency('http-cookie', '>= 1.0.2', '< 2.0') we do not ship the http-cookie rubygem.
If I was packaging this, I would rather port these functions than including a whole new gem: https://github.com/sparklemotion/http-cookie/blob/master/lib/http/cookie.rb#L273 https://github.com/sparklemotion/http-cookie/blob/master/lib/http/cookie_jar.rb#L183 https://github.com/sparklemotion/http-cookie/blob/master/lib/http/cookie.rb#L331
done