Monday, 5 May 2014

Alibaba Taobao OAuth 2.0 Service Covert Redirect Web Security Bugs (Information Leakage & Open Redirect)

Alibaba Taobao OAuth 2.0 Service Covert Redirect Web Security Bugs (Information Leakage & Open Redirect)

(1) Domain:

"Taobao (simplified Chinese: 淘宝网; traditional Chinese: 淘寶網; pinyin: Táobǎo Wǎng; literally: "searching for treasure website") is a Chinese website for online shopping similar to eBay and Amazon that is operated in China by Alibaba Group. Founded by Alibaba Group on May 10, 2003, Taobao Marketplace facilitates consumer-to-consumer (C2C) retail by providing a platform for small businesses and individual entrepreneurs to open online stores that mainly cater to consumers in Chinese-speaking regions (Mainland China, Hong Kong, Macau and Taiwan) and also abroad. With around 760 million product listings as of March 2013, Taobao Marketplace is one of the world’s top 10 most visited websites according to Alexa. For the year ended March 31, 2013, the combined gross merchandise volume (GMV) of Taobao Marketplace and exceeded 1 trillion yuan." (Wikipedia)

(2) Vulnerability Description:
Taobao web application has a computer security problem. Hacker can exploit it by Covert Redirect cyber attacks. 

The vulnerabilities can be attacked without user login. Tests were performed on Microsoft IE (10.0.9200.16750) of Windows 8, Mozilla Firefox (34.0) & Google Chromium 39.0.2171.65-0 ubuntu0. (64-bit) of Ubuntu (14.04),Apple Safari 6.1.6 of Mac OS X Lion 10.7. 

(2.1) Vulnerability Detail:
Taobao's OAuth 2.0 system is susceptible to Attacks. More specifically, the authentication of parameter "&redirct_uri" in OAuth 2.0 system is insufficient. It can be misused to design Open Redirect Attacks to Taobao.

At the same time, it can be used to collect sensitive information of both third-party app and users by using the following parameters (sensitive information is contained in HTTP header.),

It increases the likelihood of successful Open Redirect Attacks to third-party websites, too.

The vulnerabilities occurs at page "/authorize?" with parameter "&redirect_uri", e.g. [1]

Before acceptance of third-party application:
When a logged-in Taobao user clicks the URL ([1]) above, he/she will be asked for consent as in whether to allow a third-party website to receive his/her information. If the user clicks OK, he/she will be then redirected to the URL assigned to the parameter "&redirect_uri".

If a user has not logged onto Taobao and clicks the URL ([1]) above, the same situation will happen upon login.

After acceptance of third-party application:
A logged-in Taobao user would no longer be asked for consent and could be redirected to a webpage controlled by the attacker when he/she clicks the URL ([1]).

For a user who has not logged in, the attack could still be completed after a pop-up page that prompts him/her to log in.

(2.1.1) Taobao would normally allow all the URLs that belong to the domain of an authorized third-party website. However, these URLs could be prone to manipulation. For example, the "&redirect_uri" parameter in the URLs is supposed to be set by the third-party websites, but an attacker could change its value to make Attacks.

Hence, a user could be redirected from Taobao to a vulnerable URL in that domain first and later be redirected from this vulnerable site to a malicious site unwillingly. This is as if the user is redirected from Taobao directly. The number of Taobao's OAuth 2.0 client websites is so huge that such Attacks could be commonplace.

Before acceptance of the third-party application, Taobao's OAuth 2.0 system makes the redirects appear more trustworthy and could potentially increase the likelihood of successful Open Redirect Attacks of third-party website.

Once the user accepts the application, the attackers could completely bypass Taobao's authentication system and attack more easily.

(2.2) Used one of webpages for the following tests. The webpage is "". Can suppose it is malicious and contains code that collect sensitive information of both third-party app and users.

Below is an example of a vulnerable third-party domain:

Vulnerable URL in this domain:

Vulnerable URL from Taobao that is related to


(2.3) The following URLs have the same vulnerabilities.

POC Video:

Blog Detail:

(3) What is Covert Redirect? 
Covert Redirect is a class of security bugs disclosed in May 2014. It is an application that takes a parameter and redirects a user to the parameter value without sufficient validation. This often makes use of Open Redirect and XSS (Cross-site Scripting) vulnerabilities in third-party applications.

Covert Redirect is also related to single sign-on, such as OAuth and OpenID. Hacker may use it to steal users' sensitive information. Almost all OAuth 2.0 and OpenID providers worldwide are affected. Covert Redirect can work together with CSRF (Cross-site Request Forgery) as well. 

Discover and Reporter:
Wang Jing, Division of Mathematical Sciences (MAS), School of Physical and Mathematical Sciences (SPMS), Nanyang Technological University (NTU), Singapore. (@justqdjing)

Related Articles:


阿里巴巴 淘宝 网站 OAuth 2.0 隐蔽重定向 (Covert Redirect) 网络安全漏洞 (信息泄漏 & 公开重定向) 

(1) 域名:

"淘宝网是亚太地区较大的网络零售商圈,由阿里巴巴集团在2003年5月10日投资创立。淘宝网现在业务跨越C2C(个人对个人)、B2C(商家对个人)两大部分。截止2014年,淘宝网注册会员超5亿人每天有超过1.2亿的活跃用户,在线商品数达到10亿件,淘宝网和天猫平台的交易额总额超过了1.5万亿。" (百度百科)

(2) 漏洞描述:
阿里巴巴 淘宝 网站有有一个计算机安全问题,黑客可以对它进行隐蔽重定向 (Covert Redirect) 网络攻击。

这个漏洞不需要用户登录,测试是基于微软 Windows 8 的 IE (10.0.9200.16750); Ubuntu (14.04) 的 Mozilla 火狐 (Firefox 34.0) 和 谷歌 Chromium 39.0.2171.65-0; 以及苹果 OS X Lion 10.7 的 Safari 6.16。

(2.1) 漏洞细节:
Taobao 的 OAuth 2.0 系统可能遭到攻击。更确切地说, Taobao 对 OAuth 2.0 系统的 parameter “&redirect_uri“ 验证不够充分。可以用来构造对 Taobao 的 URL跳转 攻击。

与此同时,这个漏洞可以用下面的参数来收集第三方 App 和 用户 的敏感信息(敏感信息包含在 HTTP header里), 


它也增加了对第三方网站 URL跳转 攻击的成功率。

漏洞地点 "/authorize?",参数"&redirect_uri", e.g. [1]

同意三方 App 前:

当一个已经登录的 Taobao 用户点击上面的 URL ([1]), 对话框会询问他是否接受第三方 App 接收他的信息。如果同意,他会被跳转到 参数 "&redirect_uri" 的 URL。

如果没有登录的Taobao 用户点击 URL ([1]), 他登录后会发生同样的事情。

同意三方 App 后:

已经登录的 Taobao 用户 不会再被询问是否接受 三方 App。当他点击 URL ([1]) 时,他会被直接跳转到攻击者控制的页面。

如果 Taobao 用户没有登录,攻击依然可以在要求他登录的Taobao的对话框被确认后完成(这个过程不会提示任何和三方 App 有关的内容)。

(2.1.1) Taobao 一般会允许属于已被验证过得三方 App domain 的所有 URLs。 然而,这些 URLs 可以被操控。比如,参数 "&redirect_uri" 是被三方 App 设置的,但攻击者可以修改此参数的值。

因此,Taobao 用户意识不到他会被先从 Taobao 跳转到第三方 App 的网页,然后从此网页跳转到有害的网页。这与从 Taobao 直接跳转到有害网页是一样的。

因为 Taobao 的 OAuth 2.0 客户很多,这样的攻击可以很常见。

在同意三方 App 之前,Taobao 的 OAuth 2.0 让用户更容易相信被跳转的页面是安全的。这增加了三方 App 被 URL跳转 攻击的成功率。

同意三方 App 后, 攻击者可以完全绕过 Taobao 的 URL跳转 验证系统。

(2.2) 用了一个页面进行了测试, 页面是 "". 可以假定它是有害的,并且含有收集三方 App 和用户敏感信息的 code。

下面是一个有漏洞的三方 domain:

这个 domain 有漏洞的 URL:

Taobao 与 有关的有漏洞的 URL:


POC 视频:

(3) 什么是隐蔽重定向? 
隐蔽重定向 (Covert Redirect) 是一个计算机网络安全漏洞。这个漏洞发布于 2014年5月。漏洞成因是网络应用软件对跳转到合作者的跳转没有充分过滤。这个漏洞经常利用第三方网站 (包括合作网站) 的公开重定向 (Open Redirect) 或者 跨站脚本漏洞 (XSS - Cross-site Scripting) 问题。

隐蔽重定向也对单点登录 (single sign-on) 有影响。最初发布的是对两款常用登录软件 OAuth 2.0 和 OpenID 的影响。黑客可以利用真实的网站进行网络钓鱼,从而窃取用户敏感信息。几乎所用提供 OAuth 2.0 和 OpenID 服务的网站都被影响。隐蔽重定向也可以和 跨站请求伪造 (CSRF - Cross-site Request Forgery) 一起利用。

1 comment:


      今晨,继OpenSSL漏洞后,开源安全软件再曝安全漏洞。新加坡南洋理工大学研究人员Wang Jing发现,Oauth2.0授权接口的网站存“隐蔽重定向”漏洞,黑客可利用该漏洞给钓鱼网站“变装”,用知名大型网站链接引诱用户登录钓鱼网站,一旦用户访问钓鱼网站并成功登陆授权,黑客即可读取其在网站上存储的私密信息。据悉,腾讯QQ、新浪微博、Facebook、Google等国内外大量知名网站受影响,360网络攻防实验室已紧急公布了修复方案,企业和个人用户均可通过360安全卫士防范该漏洞攻击。