Re: [OAUTH-WG] Authorization Code Leakage feedback (Yaron Goland)

Eran Hammer-Lahav <> Thu, 18 August 2011 06:06 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 5327221F8686 for <>; Wed, 17 Aug 2011 23:06:39 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.557
X-Spam-Status: No, score=-2.557 tagged_above=-999 required=5 tests=[AWL=0.041, BAYES_00=-2.599, HTML_MESSAGE=0.001]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id VJvKt7xrIROQ for <>; Wed, 17 Aug 2011 23:06:37 -0700 (PDT)
Received: from ( []) by (Postfix) with SMTP id AF38C21F863E for <>; Wed, 17 Aug 2011 23:06:36 -0700 (PDT)
Received: (qmail 14860 invoked from network); 18 Aug 2011 06:07:28 -0000
Received: from unknown (HELO ( by with SMTP; 18 Aug 2011 06:07:28 -0000
Received: from P3PW5EX1MB01.EX1.SECURESERVER.NET ([]) by P3PW5EX1HT003.EX1.SECURESERVER.NET ([]) with mapi; Wed, 17 Aug 2011 23:07:27 -0700
From: Eran Hammer-Lahav <>
To: "Lodderstedt, Torsten" <>, OAuth WG <>
Date: Wed, 17 Aug 2011 23:06:11 -0700
Thread-Topic: Authorization Code Leakage feedback (Yaron Goland)
Thread-Index: AcxcoxKThYc7pGPAToaDsdhSj5islAAI/wTAAClx6dA=
Message-ID: <90C41DD21FB7C64BB94121FBBC2E72345029DFA962@P3PW5EX1MB01.EX1.SECURESERVER.NET>
References: <90C41DD21FB7C64BB94121FBBC2E72345028F2D75C@P3PW5EX1MB01.EX1.SECURESERVER.NET> <>
In-Reply-To: <>
Accept-Language: en-US
Content-Language: en-US
acceptlanguage: en-US
Content-Type: multipart/alternative; boundary="_000_90C41DD21FB7C64BB94121FBBC2E72345029DFA962P3PW5EX1MB01E_"
MIME-Version: 1.0
Subject: Re: [OAUTH-WG] Authorization Code Leakage feedback (Yaron Goland)
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: OAUTH WG <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Thu, 18 Aug 2011 06:06:39 -0000

I think using phishing here is misleading. This is not a classic phishing attack. I'm open to other suggestions.


From: Lodderstedt, Torsten []
Sent: Wednesday, August 17, 2011 3:22 AM
To: Eran Hammer-Lahav; OAuth WG
Subject: AW: Authorization Code Leakage feedback (Yaron Goland)

Text sounds very good.

wrt title: this threat is about phishing another user's authorization code. Because of the design of the protocol this requires the attacker to use another redirect URI than used by the legitimate client. To make this the title sound bit weird to me. Why not "authorization code phishing"?


Von: Eran Hammer-Lahav []<mailto:[]>
Gesendet: Mittwoch, 17. August 2011 08:39
An: OAuth WG
Betreff: [OAUTH-WG] Authorization Code Leakage feedback (Yaron Goland)

> 10.6. Authorization Code Leakage: Comment "I fancy myself as being

> reasonably intelligent and I'm unclear what attack is actually being described

> here."

Yeah... I had to go back to -16 to be reminded of the section original title 'session fixation attack' to figure out what this was about.

How about this:

10.6.  Authorization Code Redirection URI Manipulation

   When requesting authorization using the authorization code grant

   type, the client can specify a redirection URI via the "redirect_uri"

   parameter.  If an attacker can manipulate the value of the

   redirection URI, it can cause the authorization server to redirect

   the resource owner user-agent to a URI under the control of the

   attacker with the authorization code.

   An attacker can create an account at a legitimate client and initiate

   the authorization flow.  When the attacker is sent to the

   authorization server to grant access, the attacker grabs the

   authorization URI provided by the legitimate client, and replaces the

   client's redirection URI with a URI under the control of the

   attacker.  The attacker then tricks the victim into following the

   manipulated link to authorize access to the legitimate client.

   Once at the authorization server, the victim is prompted with a

   normal, valid request on behalf of a legitimate and familiar client,

   and authorizes the request.  The victim is then redirected to an

   endpoint under the control of the attacker with the authorization

   code.  The attacker completes the authorization flow by sending

   the authorization code to the client using the original redirection

   URI provided by the client.  The client exchanges the authorization

   code with an access token and links it to the attacker's client

  account which can now gain access to the protected resources

   authorized by the victim (via the client).

   In order to prevent such an attack, the authorization server MUST

   ensure that the redirection URI used to obtain the authorization

   code, is the same as the redirection URI provided when exchanging the

   authorization code for an access token.  The authorization server

   SHOULD require the client to register their redirection URI and if

   provided, MUST validate the redirection URI received in the

   authorization request against the registered value.