Vulnerabilities / Threats // Advanced Threats
5/4/2014
00:00 AM
Tim Wilson
Tim Wilson
Quick Hits
Connect Directly
RSS
E-Mail
50%
50%

Security Flaw Found In OAuth 2.0 And OpenID; Third-Party Authentication At Risk

Authentication methods used by Facebook, Google, and many other popular websites could be redirected by attackers, researcher says.

A security researcher has uncovered serious security vulnerabilities in the technologies used by many websites to authenticate users via third-party websites.

blog posted late last week revealed the details of security flaws in OAuth 2.0 and OpenID, two technologies that are widely used by the Web's most popular sites to more quickly and easily verify the identity of a user. The vulnerability was discovered by Wang Jing, a PhD student in mathematics at Nanyang Technological University.

If you have ever allowed an application or website to verify your identity using your Facebook, Twitter, or Google account, then you have likely used OAuth or OpenID. OAuth is an open standard for authorization that gives client applications secure, delegated access to server resources on behalf of a resource owner.

OpenID an open standard that allows users to be authenticated by certain cooperating sites using a third party service, eliminating the need for webmasters to provide their own authentication systems and allowing users to consolidate their digital identities.

The vulnerability could allow an attacker to redirect the "token" used by OAuth 2.0 to access user information on a third-party site, making it possible to steal information such as the email address, age, or location of a user, the blog says. In OpenID, the vulnerability could enable attackers to collect user's information directly.

"Compounded by the large number of companies involved, this vulnerability could lead to huge consequences if left unresolved," the blog states.

The flaw is described as a "Covert Redirect" vulnerability, in which an application takes a parameter and redirects a user to the parameter value without sufficient validation. This differs from an Open Redirect, in which an application takes a parameter and redirects a user to the parameter value without any validation at all.

If a website is exposed to Open Redirect attack, it is often because the site's operators failed to equip their own site with proper validation, the blog explains. But a Covert Redirect is trickier, because it is essentially a flaw in the handoff of validation between one site and another.

"The Covert Redirect vulnerability related to OAuth 2.0 and OpenID is, in the author’s view, a result of the provider’s overconfidence in its clients/partners," the blog says. "The provider relies on the clients to provide a list of 'trustworthy' domains and assumes all would be safe. However, without sufficient verification of the redirected URLs, no safety could be guaranteed."

It isn't always clear who's responsible for the vulnerability: the website requesting the authentication or the third-party provider that gives the validation, the blog observes.

"The vulnerability is usually due to the existing weakness in the third-party websites," the blog says. "However, they may be unaware of the vulnerability. Or they do not bother to fix it. One concern is the cost. The other is that in their view, the host company is responsible for making the attacks appear more credible; therefore, it is not solely their problem. However, to the provider, the problem does not originate from its own website. Even if it is willing to take on the responsibility, it has to gain cooperation from all the clients, which is a daunting task."

And because it isn't clear who's responsible for the vulnerability, it may be a difficult problem to fix, the blog notes.

"The patch of this vulnerability is easier said than done," the blog says. "If all third-party applications strictly adhere to using a whitelist, then there would be no room for attacks. However, in the real world, a large number of third-party applications do not do this. This makes the systems based on OAuth 2.0 or OpenID highly vulnerable." Providers need to develop a more thorough verification procedure, the blog suggests.  

Casey Ellis, CEO and founder of Bugcrowd, notes that the new vulnerability is far from the first to be reported in the OAuth/OpenID space. One such bug was reported over a year ago, but OAuth implementations were generally not tested to look for it, he notes.

"The unchecked/open redirect problem is actually a known issue that's been around since the inception of OAuth, but now that it's getting attention, this is an immediate and pressing vulnerability that any malicious actor could easily be aware of," Ellis said in an email. "There's been some noise made about how difficult it will be to fix these problems on some big-name websites, but it's not unfixable in all cases — their customers are already in the process of patching."

 

Tim Wilson is Editor in Chief and co-founder of Dark Reading.com, UBM Tech's online community for information security professionals. He is responsible for managing the site, assigning and editing content, and writing breaking news stories. Wilson has been recognized as one ... View Full Bio

Comment  | 
Print  | 
More Insights
Comments
Newest First  |  Oldest First  |  Threaded View
securityaffairs
100%
0%
securityaffairs,
User Rank: Ninja
5/5/2014 | 2:11:57 PM
Re: Vulnerability was already well documented.
Let me add my point of view from my blog post

 

http://securityaffairs.co/wordpress/24585/intelligence/covert-redirect-oauth-openid.html

 

We cannot compare the severity of Covert Redirect vulnerability to theHeartbleed flaw, but it could be a serious error to underestimate it. Wang sustains that one of the main problem approaching the Covert Redirect flaw is to pretend that third-party sites will fix the problem.

To be honest, this isn't the first time the flaw has been debated, Covert Redirect has surely a minor impact than Heartbleed, which could expose the most critical information.

Last year, Egor Homakov reported similar issues and the IETF outline on OAuth 2.0 warns about the risk associated with open redirects in the redirect_uri.  Also LinkedIn company raised an alert regarding registering URIs earlier this year.

I believe that we are not facing with a vulnerability in the principal web services provided by companies like Google and Facebook problem, the problem is not in the OAuth 2.0 framework, but it is the lack of token whitelisting in its implementation made by third parties.

Regards

Pierluigi
S3Jensen
50%
50%
S3Jensen,
User Rank: Apprentice
5/5/2014 | 1:43:56 PM
Vulnerability was already well documented.
I'm still not sure why this issue is making headlines? This was a known issue in the OAuth 2.0 documentation. Section 4.2.4 discusses it.

http://tools.ietf.org/html/rfc6819#section-4.2.4
Register for Dark Reading Newsletters
White Papers
Cartoon
Current Issue
Dark Reading, September 16, 2014
Malicious software is morphing to be more targeted, stealthy, and destructive. Are you prepared to stop it?
Flash Poll
Video
Slideshows
Twitter Feed
Dark Reading - Bug Report
Bug Report
Enterprise Vulnerabilities
From DHS/US-CERT's National Vulnerability Database
CVE-2012-5700
Published: 2014-09-22
Multiple cross-site scripting (XSS) vulnerabilities in Baby Gekko before 1.2.2f allow remote attackers to inject arbitrary web script or HTML via the (1) id parameter to admin/index.php or the (2) username or (3) password parameter in blocks/loginbox/loginbox.template.php to index.php. NOTE: some o...

CVE-2014-0484
Published: 2014-09-22
The Debian acpi-support package before 0.140-5+deb7u3 allows local users to gain privileges via vectors related to the "user's environment."

CVE-2014-2942
Published: 2014-09-22
Cobham Aviator 700D and 700E satellite terminals use an improper algorithm for PIN codes, which makes it easier for attackers to obtain a privileged terminal session by calculating the superuser code, and then leveraging physical access or terminal access to enter this code.

CVE-2014-3595
Published: 2014-09-22
Cross-site scripting (XSS) vulnerability in spacewalk-java 1.2.39, 1.7.54, and 2.0.2 in Spacewalk and Red Hat Network (RHN) Satellite 5.4 through 5.6 allows remote attackers to inject arbitrary web script or HTML via a crafted request that is not properly handled when logging.

CVE-2014-3635
Published: 2014-09-22
Off-by-one error in D-Bus 1.3.0 through 1.6.x before 1.6.24 and 1.8.x before 1.8.8, when running on a 64-bit system and the max_message_unix_fds limit is set to an odd number, allows remote attackers to cause a denial of service (dbus-daemon crash) or possibly execute arbitrary code by sending one m...

Best of the Web
Dark Reading Radio