Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 550560 - dev-ruby/omniauth: CSRF
Summary: dev-ruby/omniauth: CSRF
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Security
URL: http://www.openwall.com/lists/oss-sec...
Whiteboard: ~4 [ebuild]
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-27 13:30 UTC by Agostino Sarubbo
Modified: 2016-11-26 00:49 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2015-05-27 13:30:32 UTC
From ${URL} :

Affected software: 
- Ruby gem (library) OmniAuth[0]
- Gems that use OmniAuth, e.g. Devise[1]

Type of vulnerability: 
Cross-Site Request Forgery

Original report by: 
Mohamed Abdelbaset Elnoby, Senior Information Security Analyst at Seekurity.com[2]
[The website Seekurity.com isn’t currently working.]

Summary:

OmniAuth is a library used in Ruby web applications to authenticate users using 
external services, for example OAuth providers. 

The request phase of OmniAuth is vulnerable to Cross-Site Request Forgery. This 
is the step that actually connects an external account (on a connected OAuth 
provider) to an internal account (on the web application itself). This means 
that when a client is signed into an account on the web application, and signed 
into an account on a connected OAuth provider, these two accounts can be 
connected without user intent, user interaction or feedback to the user. From 
here on out, the external account can be used to sign into the web application 
as the internal account. 

If the sign in action at a connected OAuth provider is vulnerable to CSRF, an 
attacker can force the victim’s client to be logged into the external service 
using an account beloning to the attacker, can then force this external account 
to be connected to the internal account, and can from here on out use their 
account on the external service to log into the victim’s account on the targeted 
application.

We are aware of one large OAuth provider where the sign in action is or was 
vulnerable to CSRF.

Issue report and patch: 
https://github.com/intridea/omniauth/pull/809

References:
[0] https://github.com/intridea/omniauth
[1] https://github.com/plataformatec/devise
[2] https://twitter.com/symbiansymoh


@maintainer(s): since the package or the affected version has never been marked as stable, we don't need to stabilize it. After the bump, please remove the affected versions from the tree.
Comment 1 Hans de Graaff gentoo-dev Security 2015-05-30 05:55:14 UTC
The patch has not been accepted by upstream and they are actively looking for a different way to fix this. We'll wait for them to release new versions.
Comment 2 Aaron Bauman (RETIRED) gentoo-dev 2016-03-30 00:47:41 UTC
Upstream patch is available here:

https://github.com/intridea/omniauth/pull/809/commits/561ef98f9e324da4740c8807b04bf3e367cf971b
Comment 3 Aaron Bauman (RETIRED) gentoo-dev 2016-06-19 11:37:44 UTC
@maintainer(s), please see previous comment with patch.
Comment 4 Hans de Graaff gentoo-dev Security 2016-06-20 05:46:37 UTC
(In reply to Aaron Bauman from comment #3)
> @maintainer(s), please see previous comment with patch.

This patch was already mentioned in the original bug report. See comment 1 

Note that upstream fixed this in omniauth-rails which is a component that we don't package. My suggestion is to close this issue as-is.
Comment 5 Aaron Bauman (RETIRED) gentoo-dev 2016-06-20 09:01:11 UTC
(In reply to Hans de Graaff from comment #4)
> (In reply to Aaron Bauman from comment #3)
> > @maintainer(s), please see previous comment with patch.
> 
> This patch was already mentioned in the original bug report. See comment 1 
> 
> Note that upstream fixed this in omniauth-rails which is a component that we
> don't package. My suggestion is to close this issue as-is.

Thanks for the update, we will leave the bug open until a fix is provided.
Comment 6 Hans de Graaff gentoo-dev Security 2016-06-20 17:36:21 UTC
(In reply to Aaron Bauman from comment #5)

> Thanks for the update, we will leave the bug open until a fix is provided.

I'm fine with keeping the bug open, but I'm sure no bug fix will be forthcoming. Basically upstream said that, yes, it's possible to create CSRF issues with the omniauth framework, and this happens by default when using it in rails, so we fix the issue in omniauth-rails, but we cannot fix it in general because we cannot distinguish normal use from CSRF issues at the general level.

It would be like masking sys-devel/gcc because it is possible to create buffer overflows with it.
Comment 7 Aaron Bauman (RETIRED) gentoo-dev 2016-11-26 00:49:49 UTC
(In reply to Hans de Graaff from comment #6)
> (In reply to Aaron Bauman from comment #5)
> 
> > Thanks for the update, we will leave the bug open until a fix is provided.
> 
> I'm fine with keeping the bug open, but I'm sure no bug fix will be
> forthcoming. Basically upstream said that, yes, it's possible to create CSRF
> issues with the omniauth framework, and this happens by default when using
> it in rails, so we fix the issue in omniauth-rails, but we cannot fix it in
> general because we cannot distinguish normal use from CSRF issues at the
> general level.
> 
> It would be like masking sys-devel/gcc because it is possible to create
> buffer overflows with it.

Thanks for the information.