openid / sharedsignals

OpenID Shared Signals Working Group Repository
45 stars 11 forks source link

Issuer Mix-Up #162

Closed PedramHD closed 3 weeks ago

PedramHD commented 1 month ago

This issue is part of the ongoing formal security analysis of the SSF specification. We already created a formal model of the specification, identified and formalized security properties, and described the assumptions (as also agreed upon with the Working Group) upon which the analysis is based here: https://github.com/openid/sharedsignals/files/15014966/2024-04-09_WP4.1a-Report.pdf

Setting

As detailed in our report, we assume that Transmitters identify Receivers by dynamically created nonces which the Transmitter issues when responding to a configuration discovery request. More precisely, we assume that the Transmitters provide different endpoints for each configuration discovery request, with the URLs containing a unique part u, which is also used as the audience value for this Receiver. However, this issue also applies more generally to cases in which the identifier is chosen by the Transmitter for the Receiver out-of-band and transmitted from the Receiver to the Transmitter in a way that both parties agreed upon.

Overview

Let t be an honest Transmitter and r an honest Receiver, with u_r being the audience value assigned from t to r. Furthermore, let att be the attacker, and let u_att be the audience value that t assigned to att. Intuitively, r should not accept a SET created by t with the audience value of the attacker. As shown in the following, this might happen under the setting described above, breaking the Session Integrity property from our report (see Section 4.2).

Detailed Description

We now give more details, based on the following diagram:

issuer-mix-up

We note that in our report (as described in Section 2.4.1), we assumed that the polling endpoint is protected by a bearer token that the receiver chooses when creating the stream. This is omitted from the diagram and would not mitigate this issue, as the attacker could re-use the token that it receives in Step 7 for the request in Step 8. The Receiver r would choose this token when sending the poll request in Step 14 (as the Receiver associated this token with the stream).

Possible Fix

Upon receiving the stream configuration (Step 10), the Receiver should check whether the stream configuration has the expected issuer value, i.e., the issuer value of the configuration from which the Receiver selected the stream configuration endpoint (in Step 7). (This check should also be done when reading, updating, and replacing stream configurations).