Thanks for writing this up, Patrick. +1 that fetcher hardening belongs in
the draft itself.

I raised related concerns in issue #112 [1], where I argued that the draft
should be more opinionated about when and how the AS fetches client
metadata, based on two principles:

   1.

   The AS should reject invalid requests through inexpensive local checks
   before making any outbound request.
   2.

   Unauthenticated requests should not be able to trigger unrestricted
   outbound requests to attacker-controlled destinations.

Given Patrick's example, I would add a third principle:

   3.

   Untrusted metadata fetching should be isolated from security-sensitive
   AS components, with restricted network access and no access to signing keys
   or session secrets.

The rate-limiting guidance added in PR #115 is a useful improvement, but it
primarily addresses repeated fetches. As Patrick illustrates, even a single
malicious response could exploit a vulnerability in the underlying fetcher
stack. Rate limiting and SSRF protections alone are not sufficient.

I understand Max's point that AS implementations already fetch untrusted
URLs. However, the existence of similar practices elsewhere should not, by
itself, justify expanding the attack surface.

As a standards body, we should establish secure defaults rather than
normalize existing risks or leave critical security decisions entirely to
implementers.

[1]
https://github.com/oauth-wg/draft-ietf-oauth-client-id-metadata-document/issues/112


Thanks,

Shankar

On Wed, Nov 18, 2026 at 4:18 PM Max Gerber <mgerber=
[email protected]> wrote:

> Heya Pat,
>
> I don't think the scenario you describe is new for the AS, or specific to
> CIMD.
>
> As an AS implementer, I already take untrusted URLs from my customers and
> fetch them. I take in client JWKS URLs, and metadata and JWKS for upstream
> enterprise IdPs federating into my AS. Those customers authenticate to my
> AS when they configure those URLs, but our signup is self-serve, so that
> authentication doesn't establish any trust. Any attacker can create an
> account and point those fields at a domain they control. A CIMD client_id
> follows the same pattern, just skipping the self-serve signup part.
>
> The draft should have solid SSRF security considerations, but I don't
> think this makes CIMD meaningfully harder to adopt than what ASs already do.
>
> Best,
> Max
>
> On Wed, Nov 18, 2026 at 3:30 PM Patrick White <[email protected]>
> wrote:
>
>> 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]
>>
> _______________________________________________
> OAuth mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
>
_______________________________________________
OAuth mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to