-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Recipient Arrangement Revocation Endpoint exposed to Mixup Attack #426
Comments
Thanks @biza-io, given the issue, this change request will be brought into the current maintenance iteration for consultation at next Wednesday's maintenance call.
|
Hi @CDR-API-Stream, Firstly, the term Secondly, we wish to note there is no documented Responsible Disclosure guidance for any part of the CDR. Guidance and public documentation on this more broadly for the Standards and Participants would be appreciated.
This is a lateral movement vulnerability utilising a JWT version of the venerable "pass the ticket" method in Kerberos environments.
As stated in the original issue The:
Means that this communication path is possibly the most exposed to interception in the CDR. Even the authorisation endpoint is headed towards needing to be "port knocked" via a PAR request before being functional. In FAPI comms such exposure is countered by the combination of mandating MTLS to sender constrain tokens and parameters are armoured by virtue of the content being signed. In essence while the JWT itself is intended to be protected there are a variety of other mechanism in play so that even if it is disclosed the call remains secure - these mechanisms do not apply to the Recipient hosted endpoint.
CDR Arrangement Identifier is not considered a secret and, as such, is available in consumer dashboards on both sides either explicitly (displayed to the user) or implicitly (used as a handle in API calls). This significantly increases the likelihood that arrangement identifiers can be collected en-masse using client side attacks of various types via Consumer devices.
There is no Register trust involved as the call is done via TLS to the Data Recipient such that no transport level validation is possible (nor possible without ADRs mandating MTLS) and assumes the client assertion is collected and still valid (which it may be, forever, as no expiry time is specified).
It is difficult to provide a recommendation as this endpoint has no underpinning international standards or prescribed security best practice applied nor does it appear to have had formal analysis done. While Biza.io are specialists in the CDR, members of OpenID Foundation and participants in the FAPI Working Group, we are not CREST certified and consequently penetration testing is not our primary objective, we effectively identified this issue during standard secure coding review related to work associated with #128. We recommend the DSB secure a suitably qualified professional opinion. Our general advice would be to separate authentication logic from business logic which would be option (2) but this means that a Recipient will need to perform two validations, potentially doubling the exposure to acknowledged and accepted DDOS exposure. With reference to the somewhat prescient issue 196, a third option may be to mandate MTLS at the ADR endpoint however this may force a significant change in architecture for both Holders and Recipients. Such a requirement would likely require an additional attribute within the Register to facilitate the advertisement of an MTLS endpoint for Data Recipients coupled with integration by Holders to utilise such information.
As stated |
Thanks for the feedback @biza-io. After reviewing this issue further there are a few things that would be worth clarifying that may impact the recommended solution. The use of client assertion is only expected for an ADR calling the DH hosted version of the arrangement revocation endpoint. The non-normative example in the standards shows the DH exposed version of the endpoint. This highlights that adding a non-normative example for the ADR hosted version would be a good addition to the standards and may help reduce confusion. The ADR hosted version of this endpoint uses the self-signed JWT pattern which includes a requirement to prevent token reuse. This limits the risk somewhat as a captured token could only be used once and cannot be reused in a playback style attack. The DH version uses client assertion (called private key jwt in the standards). This is protected by MTLS as required by FAPI and also includes a requirement to prevent token reuse. This may ameliorate the risk somehwat but the core issue still remains that the arrangement ID is not cryptographically tied to a party and, unlike tokens, may be able to scraped from other sources such as CDR Receipts. It does potentially influence the preferred solution, however. If option 1 was adopted it would require not only that the arrangement ID is added to the client assertion for the DH hosted endpoint but also to the self-signed JWT for the ADR hosted version. Option 2 would be able to applied consistently to both the DH and ADR endpoints. It would also have the advantage that it would allow for easier phase in as, if the suggested Does this align with your understanding @biza-io? |
After discussion with the community throughout the maintenance iteration meetings on this issue, the proposed solution for feedback and discussion in the call today, is as follows:
A strategic long-term consultation on secure event messaging and notifications will be consulted on in 2022. |
Hello, Brett here from Frollo. We would like to note that the client_assertion sent along with a DH initiation revocation request must contain a Having said that, we are happy to support Option 2 and the implementation difficulty on DRs is very minor. |
@brett-frollo Footnote: This relates to self-signed authentication versus private key jwt client assertions. I'm dubious about calling self-signed authentication a "client assertion" because it's easily confused with JWT client assertions (which it really isn't). |
This change was incorporated into release v1.15.0. Refer to Decision 212 for further details. |
Description
The Arrangement Revocation endpoint accepts a
cdr_arrangement_id
which is not cryptographically bound to the client assertion generated by the Holder.Ie. From the current Standards
In addition the Arrangement Revocation endpoint hosted by Recipients does not require MTLS and the expiry of the JWT is not prescribed (in fact it is referenced as "ID Token").
As a consequence, should an outbound client assertion be collected or retrieved along the way it is possible to issue, potentially forever, revocation requests to Data Recipients for any number of
cdr_arrangement_id
's from any source location for as long as the collected JWT (from either form or header parameters depending on the reading of the Standards) has not expired.This particular vector is explicitly covered in FAPI 1 Part 2 5.2.2(10) with respect to the authorisation endpoint:
As far as we can see this vulnerability has not been identified or noted at any point and indeed this endpoint may not have existed at the time of the last independent security review.
Area Affected
ADR hosted Recipient Revocation Endpoint.
Change Proposed
Armouring the arrangement id in its current state will likely have a high implementation difficulty as the Standards utilise a bespoke interpretation of RFC6750 whereby the Bearer token is designated as a JWT with customised fields leveraging Register specific details (Holder Brand ID) for the
iss
. The Standards are even more ambiguous because the non-normative example appears to simulate aprivate_key_jwt
like method - this has resulted in Holder implementations actually shipping both a Bearer token and the client assertion as form fields exacerbating the exposure of this attack vector. Nonetheless, the prescribed JWT structure is such that it is somewhat challenging to align with RFC7523 (which would mandateclient_id
inside the JWT).Regardless, the following options are outlined:
cdr_arrangement_id
in the Bearer Authorization header and require that the form posted arrangement identifier and the JWT included one matchcdr_arrangement_id
parameter withcdr_arrangement_jwt
and include thecdr_arrangement_id
within a freshly signed JWT containing CDR specific attributes while continuing to segregate authentication logic from business logic.The text was updated successfully, but these errors were encountered: