Attackers can bypass Netease oauth redirect_uri to restrict account token hijacking.

Source: Internet
Author: User

Here is through Netease Account Login 56 network authorization page: https://api.t.163.com/oauth2/authorize? Client_id = II5coZy8DdAtKt7a & redirect_uri = http % 3A % 2F % 2Fapp.56.com % 2 Fcooperate % 2Findex. php % 3 Faction % 3 DWeibo o % 26tag % 3Dwy % 26do % 3 DCheckLogin % 26 from % 3 Dregbox & response_type = code & state = unk-qogvtqoomz among them, client_id (similar to appkey) bind to redirect_uri. If you change the redirect_uri parameter to another domain name, an error is returned: {"request": "/oau2/ authorize", "error": "error = redirect_uri_mismatch ", "error_code": "401", "message_code": "a0000153"} vulnerability exists in the redirect_uri parameter. The redirect_uri parameter can be % 40 to bypass the validity check. We construct an address: https://api.t.163.com/oauth2/authorize? Client_id = II5coZy8DdAtKt7a & redirect_uri = http % 3A % 2F % 2Fapp.56.com % 40wooyun.org where the decoded redirect_uri parameter is: http://app.56.com @ wooyun.org successfully bypasses the validity check. After logging on to the system, the authorization is successfully redirected to the address we specified. The token is leaked:


Hazard: hackers can create a page to record and hijack user tokens, and then control user accounts.Solution:Enhance redirect_uri Parameter Validation

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.