-
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
Validate method
parameter of HttpClient.open(), check it has no CR, LF
#45744
Comments
/cc @aam |
If I understand CRLF injection correctly assumption is that some unexpected code gets in the middle between client and server and updates method of the HTTP request with headers separated by CRLF. |
The RFC-2616 on Page 35, states the following:
According to this, maybe it is better to check the |
Yeah, we could add such a check. That would be a breaking change I imagine. |
method
seems to be injectablemethod
parameter of HttpClient.open(), check it has no CR, LF
I just noticed this issue because dio has a CVE entry about this: https://nvd.nist.gov/vuln/detail/CVE-2021-31402 which is scored as high. |
Unless I am missing something it's dart code itself that sends a request that also controls the method name. There is nowhere for attacker to insert itself so they update method name maliciously. Because of that I think the risk is non-existent/low. Still though, validating that |
@aam @brianquinlan What is the progress on this? German regulators have caught up to this problem due to CVE priority. Please either fix this, or negotiate with CVE to revert. |
Looks like it slipped through the cracks. |
The code above will generate a Http Request which looks like the following.
This request will let the server response twice and make the HttpClient throws an exception.
And this will cause a CRLF injection.
Related Issue: cfug/dio#1130
The text was updated successfully, but these errors were encountered: