Re: [OAUTH-WG] OAuth 2.0 Security Best Current Practice | Issue in Mix-Up Countermeasure

Daniel Fett <fett@danielfett.de> Tue, 26 November 2019 14:20 UTC

Return-Path: <fett@danielfett.de>
X-Original-To: oauth@ietfa.amsl.com
Delivered-To: oauth@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C26BA12012A for <oauth@ietfa.amsl.com>; Tue, 26 Nov 2019 06:20:21 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=danielfett.de
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oXdVqy5o5j3n for <oauth@ietfa.amsl.com>; Tue, 26 Nov 2019 06:20:20 -0800 (PST)
Received: from d3f.me (redstone.d3f.me [5.9.29.41]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 0F08A120025 for <oauth@ietf.org>; Tue, 26 Nov 2019 06:20:20 -0800 (PST)
Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by d3f.me (Postfix) with ESMTPA id 4E17B1B2A for <oauth@ietf.org>; Tue, 26 Nov 2019 14:20:18 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=danielfett.de; s=dkim; t=1574778018; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rYJQIOuvyZ3iDQY/EPwA4FTqT88dpMh4NQYBMCUKsio=; b=KiQf0sPLhCGixHppLA5bHU5e51BZjQvSG0HEfsXTFZF+YnN7az/UjKX9EQ6d9kfhha86Vr VXJcxBwR+O33IC/Hq1/AuqfJAZ3NZ4NX+QJnVpR7cpAsp0xTj0jRje2UEWt3nJUBikORor 7WXLTqpX25pnbfAcaFM5mTftzlH+Ua0=
To: oauth@ietf.org
References: <35143dd1-edeb-e0fd-6f36-a39d9b7f7008@hackmanit.de>
From: Daniel Fett <fett@danielfett.de>
Message-ID: <4f1d1215-aa23-93ab-ae5b-75426d7f07cc@danielfett.de>
Date: Tue, 26 Nov 2019 15:20:17 +0100
MIME-Version: 1.0
In-Reply-To: <35143dd1-edeb-e0fd-6f36-a39d9b7f7008@hackmanit.de>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Content-Language: de-AT-frami
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=danielfett.de; s=dkim; t=1574778018; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rYJQIOuvyZ3iDQY/EPwA4FTqT88dpMh4NQYBMCUKsio=; b=twoKM9tkpqQ5OzlLegV7vBbaayu8feeF3jZakaZ/OP+jN0kLRMg0rlzfBO6jPucDzxkvuR LuAqX4RjxK5kLJuRNj5+9a7Oi8U26xqZfz18yZO4tejrqx0n7EqtiFMDuTOu0jYjrRO6q5 bXs301AIkz+fkOhxO2AYOW3CBqjvp1w=
ARC-Seal: i=1; s=dkim; d=danielfett.de; t=1574778018; a=rsa-sha256; cv=none; b=OuEjeY5azK2oaGIRfBUxw1fE9SNnpO7qEVtfzaKsAjYn7YtNDrQjAj1RD2D5B5nwKhKscSLFSV/ZlGUx5BNTOaIGWBd3fC/bbCFvLliiECW5bkIfG6GbA5VtHq70a9hmXN5gsIGFy8sLi9gfeaisKAX0/h18xHuKA0jXtThOkkM=
ARC-Authentication-Results: i=1; d3f.me; auth=pass smtp.auth=fett@danielfett.de smtp.mailfrom=fett@danielfett.de
Authentication-Results: d3f.me; auth=pass smtp.auth=fett@danielfett.de smtp.mailfrom=fett@danielfett.de
X-Spamd-Bar: /
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/x_BSlioVtvaj1Gwq92GWF8Pf64c>
Subject: Re: [OAUTH-WG] OAuth 2.0 Security Best Current Practice | Issue in Mix-Up Countermeasure
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: OAUTH WG <oauth.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/oauth>, <mailto:oauth-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/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: Tue, 26 Nov 2019 14:20:22 -0000

Hi Karsten,

Very interesting observation!

My gut feeling is that this is the real problem here:

Am 26.11.19 um 14:24 schrieb Karsten Meyer zu Selhausen:
> Depending on its implementation the client might simply extract all data
> contained in the Client Information Response and use it for
> authorizations with the specific AS.
> We were able to confirm that one popular open-source library behaves in
> this exact way. It stores the redirect URI contained in the Client
> Information Response and uses it for Authorization Requests with the
> A-AS although it differs from the redirect URI in the Client
> Registration Request.

The client uses untrusted, unverified data to make its decision on what
redirect URI to use.

Nonetheless, we should definitely mention this in the BCP!

> In our opinion this makes the countermeasure "AS-specific redirect URIs"
> obsolete and we believe the other countermeasure described in the BCP
> (adding an AS identifier and the client_id of the intended recipient to
> AS's responses) should be used to prevent Mix-Up attacks. If the
> involved entities use the OIDC hybrid flow this countermeasure is
> automatically applied.

These are more intrusive changes than the per-AS redirect URI and may
require new parameters.

Daniel