-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Security: AHC can be tricked into connecting to a different host #1455
Comments
Motivation: AHC can be tricked into connecting to a different host. Modification: * Make sure we don’t interpret `?` in the anchor as the beginning of the query and the end of the path. * Update tests to check org.asynchttpclient.uri.Uri returns the same results as java.net.URI. Result: AHC no longer tricked by anchors containing question mark.
I think this falls into the category of SSRF checks. There's some research here find-sec-bugs/find-sec-bugs#307 and I've got a (not working) SSRF filter in progress in Play WS playframework/play-ws#118 |
@wsargent Thanks for the info. I guess one could implement such filter directly in AHC too. |
I tested v2.0.35, which looks OK (it now behaves like Java.net.URI). Regarding exploitability of versions < 2.0.35: it appears that controlling the "path" or "query" parts of the request isn't possible. So, the worst impacts I can think of are:
The second scenario looks worse. |
CVE-2017-14063 was assigned. |
That version fixes a security issue: AsyncHttpClient/async-http-client#1455 https://nvd.nist.gov/vuln/detail/CVE-2017-14063
That version fixes a security issue: AsyncHttpClient/async-http-client#1455 https://nvd.nist.gov/vuln/detail/CVE-2017-14063
fix a security vulnerability of async-http-client. See below link AsyncHttpClient/async-http-client#1455
Out of curiosity, did the Java inconsistency ever have a CVE assigned to it? Is it still present or did it get fixed?
|
Issue is very similar to CVE-2016-8624 that affected cURL last year.
AHC url parser,
org.asynchttpclient.uri.Uri
can be tricked with a anchor containing a question mark into connecting to a different host. This issue also affectsjava.net.URL
(as of 8u112) but notjava.net.URI
:Credit goes to Nicolas Grégoire from Agarri.
I'm not aware of any exploit at the moment.
Possible usages:
java.net.URI
to compute the index key.The text was updated successfully, but these errors were encountered: