[OAUTH-WG] End-User Authorization Endpoint is an Open Redirect

Michael D Adams <mike@automattic.com> Sat, 24 July 2010 09:23 UTC

Return-Path: <michael.d.adams@gmail.com>
X-Original-To: oauth@core3.amsl.com
Delivered-To: oauth@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 599933A67D7 for <oauth@core3.amsl.com>; Sat, 24 Jul 2010 02:23:47 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.849
X-Spam-Level:
X-Spam-Status: No, score=-1.849 tagged_above=-999 required=5 tests=[AWL=0.128, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ue4+AkJI9Fkm for <oauth@core3.amsl.com>; Sat, 24 Jul 2010 02:23:46 -0700 (PDT)
Received: from mail-iw0-f172.google.com (mail-iw0-f172.google.com [209.85.214.172]) by core3.amsl.com (Postfix) with ESMTP id 2AFEE3A693F for <oauth@ietf.org>; Sat, 24 Jul 2010 02:23:46 -0700 (PDT)
Received: by iwn38 with SMTP id 38so1102022iwn.31 for <oauth@ietf.org>; Sat, 24 Jul 2010 02:24:05 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:sender:received :in-reply-to:references:from:date:x-google-sender-auth:message-id :subject:to:content-type:content-transfer-encoding; bh=9/Ao9bheUz9RkoLBwWQeX1QKanDzRrZSjt0UprwvuTY=; b=thsl1O6yicDXC0pci8/zIWF+l8+uC5SOZ1/lISmxDThVGq6bAbGPmvPCsNfabe8V+B FGDId8DBD3V43u2bhlJVmIy1EI0zMJfphUxzb/6lXQb1pC2zVqQGnU/eLWgbQo6CCLRD hLiTXapdLL1DSDfb8VLjWdUf7haNV8T0eWUOE=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type :content-transfer-encoding; b=UlHFJ++FC6ZKLF3AjfSX/mDblZ5LCOLWOfICjYAtoFQxIApgQlWYgaTMxqMXNXOuEi 7lGKUtTQepTaphBJx5xg5CWDhvitF0X4eY/gEWpwJz+xsjNJMjZ3iwBFDJOUXQE5QEkJ k0Ah3jvzmU+FjjhbRcIeIJSIYF8niZ/fRhfCU=
Received: by 10.231.174.136 with SMTP id t8mr5091091ibz.158.1279963445122; Sat, 24 Jul 2010 02:24:05 -0700 (PDT)
MIME-Version: 1.0
Sender: michael.d.adams@gmail.com
Received: by 10.231.179.143 with HTTP; Sat, 24 Jul 2010 02:23:45 -0700 (PDT)
In-Reply-To: <AANLkTimstdtTJLjPF3v3RHd-=ma6irCuUgGiULiGhW4H@mail.gmail.com>
References: <AANLkTimstdtTJLjPF3v3RHd-=ma6irCuUgGiULiGhW4H@mail.gmail.com>
From: Michael D Adams <mike@automattic.com>
Date: Sat, 24 Jul 2010 02:23:45 -0700
X-Google-Sender-Auth: ZNqHIMz8mMyfOFvxkkhrXmfwt54
Message-ID: <AANLkTinQpAgV8KBEWFtrTB1UgiVs1dnTwVPdL-cScnx6@mail.gmail.com>
To: "OAuth WG (oauth@ietf.org)" <oauth@ietf.org>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
Subject: [OAUTH-WG] End-User Authorization Endpoint is an Open Redirect
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: OAUTH WG <oauth.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/oauth>, <mailto:oauth-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/oauth>
List-Post: <mailto:oauth@ietf.org>
List-Help: <mailto:oauth-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/oauth>, <mailto:oauth-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 24 Jul 2010 09:23:48 -0000

The second to last paragraph in section 3 of draft-10 states:

> The authorization server validates the request to ensure all required
> parameters are present and valid.  If the request is invalid, the
> authorization server immediately redirects the user-agent back to the
> client using the redirection URI provided with the appropriate error
> code as described in Section 3.2.

There's a couple problems here.

1. What if the client didn't register a redirect_uri and also didn't
include one in the request?  The request is invalid, but there's
nowhere to redirect the user-agent.

2. A malicious client can use the end-user authorization endpoint as
an open redirect by intentionally making an invalid request.  For
example:

End-User Authorization Endpoint: http://service.example.com/oauth/authorize/
Malicious Site: http://jerk.example.net/

I send a phishing attempt to a user of service.example.com with
something like the following link in it:

http://service.example.com/oauth/authorize/?redirect_uri=http%3A%2F%2Fjerk.example.net%2Fsteal-your-identity%2F&response_type=haha

The link looks OK at a glance, but clicking on it takes the victim to:

http://jerk.example.net/steal-your-identity/?error=unsupported_response_type

And now I do whatever evil thing I've planned.

Mike
--mdawaffe