-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add a security consideration for Server Side Request Forgey (SSRF) #11
Comments
Thanks @CheariX I believe it is worthwhile having some security consideration w.r.t this topic. Section 2 already contains this language w.r.t the client_uri value.
But I believe what you are suggesting is that ANY uri resolved from the metadata document should have such constraints? If so I think this would work in most cases but could also be overly prescriptive as a general rule, for example redirect uri's often use custom uri schemes which would prevent the general rule of enforcing "https", would you agree? |
Yes. It's good to have it there.
About the |
I'd like to seek further feedback from the wider OAuth2 WG about how much more prescriptive we want to be here, I appreciate that should at a minimum be discussed in security considerations but a normative MUST may be too strong. For example in certain situations certainly during initial application development, being able to use a local host based URL does have some practical advantages.
Yes this seems reasonable to me.
I was more thinking about situations where say a client has a redirect_uri that uses a custom platform specific scheme |
I took me some time to think about this. If we really want to support such custom schemes, it is hard to deal with "dangerous" schemes. AFAIK, there is no complete list. Working with denylists are known to be a weak mitigation (in contrast to allowlists). |
@CheariX agreed also given the client's metadata document is itself an extensible data model, meaning that it may feature new metadata elements in future it would be hard to apply a blanket rule that applies to all uri's that may occur in this discovery document. I believe instead we should add a security consideration to the document that describes this. Also please see #16 that we have merged which I think at least partially addresses one vector for SSRF. |
Further addressed in a9e84e4 |
The current draft should discuss and provide mitigation strategies for SSRF.
Currently, I see the following issues:
Attack Vectors
These parameters could force an AS calling untrusted URLs, such as private IPs / internal networks, known as SSRF.
An attacker could abuse
client_id
(which is an URL in that case) andclient_discovery
to farce ans AS calling untrusted URLs, such as private IPs / internal networks, known as SSRF.same as above.
Mitigation:
Preventing SSRF is hard and complex, since we exactly want the AS to gather a client's information via an unknown URL.
My suggestion is to add a discussion about these threats in the security considerations.
We could also deny calling of private IPs (https://datatracker.ietf.org/doc/html/rfc1918#section-3, IPv6 TBD) and require a domain name instead of an IP address.
Also, we should define "https" as the only allowed protocol (no
javascript:
,data:
, whatever ...).The text was updated successfully, but these errors were encountered: