Hi Everyone, Enjoyed the meeting today very much - I was the guy who presented the AAuth proposal with Jonathan and got up at the end of the CIMD update with the spicy take. I wanted to elaborate on my 25 seconds of rant with a real scenario that, in my opinion, makes CIMD VERY hard to adopt. If nothing else, I think client hardening needs to be a SUBSTANTIAL part of any accepted draft. Here's the scenario I'm directly worried about, this was written with help from Mythos:
An AS accepts arbitrary https client_id URLs and performs the fetch in the AS process. It implements every destination check correctly. Somewhere beneath the fetch there is a client-side flaw that is unknown or not yet patched: in the stub resolver, the TLS stack, the HTTP parser, or a content decoder. An attacker registers a domain and operates its authoritative DNS and an HTTPS server on public addresses. They send one unauthenticated request to the authorization endpoint with a client_id on that domain. No account, no registration, no user interaction. The AS resolves the name, connects, performs a TLS handshake and parses the response, and the attacker supplies the malformed input at whichever stage is vulnerable. Each attempt is an independent anonymous request, so it can be repeated freely. If the flaw gives code execution or memory disclosure, the attacker is inside, or reading from, the process that holds token-signing keys, session secrets and client credentials. They can then mint tokens for any user at any relying party. Every destination check passed. Each element has precedent: - CVE-2015-7547: stack overflow in glibc getaddrinfo triggered by DNS responses for an attacker-controlled name. Note that the SSRF address check itself requires this lookup. - CVE-2014-0160: Heartbleed applied to clients as well as servers; a hostile server could read client process memory. - CVE-2022-3602: stack overflow in OpenSSL 3.0 certificate parsing, reachable by a TLS client connecting to a hostile server (with preconditions). - CVE-2020-10770: Keycloak's authorization endpoint fetched an unauthenticated request_uri, the same structural trigger as a CIMD client_id. -- In addition to flaws like the above, it's imperative that anyone implementing this harden their client - ensure the client is NOT supplying a "true" user agent (so, harden against information leakage), not attaching any credentials, going through a proxy that is un-associated with their actual AS network location. I don't believe it's enough to bake this into an after the fact BCP, this guidance must be part of the draft itself. Hope this clarifies a bit of my comment today - the skill set to secure client side requests is fundamentally different from the skillset most backend engineers have around hardening server requests, and I worry that this proposal is just ripe for abuse. Thanks! -PW
_______________________________________________ OAuth mailing list -- [email protected] To unsubscribe send an email to [email protected]
