Author xtreak
Recipients eric.snow, jaraco, mcepl, ned.deily, orsenthil, tburke, webknjaz, xtreak
Date 2019-09-18.16:40:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1568824838.96.0.982506616595.issue36274@roundup.psfhosted.org>
In-reply-to
Content
> @xtreak the encoded null-byte test would be an extra test case to consider. It is reasonable to test as many known invalid sequences as possible. Changing that byte to encoded notation would just replace one test with another effectively changing the semantics of it.

Agreed that it's slightly different but I also admit I was also relying on the fact that encoded request will also be decoded by the server as done in most web frameworks to act upon the decoded payload. There could be systems where raw null byte might need to be transferred where the receiving system might not decode the payload but it seemed to be a workaround to ensure the required exception of serving null byte included static file was handled properly by CherryPy and also seemed to be adopted by others like urllib3.

> To me, it's quite weird that it's considered a CVE at all: it's happening on the client side and it doesn't prevent the user from just feeding the proper bytes right into the socket so why overcomplicate things?

The impacted function in http is used by functions like urllib.urlopen which is often feeded with input from the user that is not validated properly with some expectation that the function itself might handle the URL parsing and is safe enough. In this case it could lead to things like SSRF where malicious input could end up executing arbitrary code in some of the systems like Redis as demonstrated in the report. As for the CVE in question it was originally reported to golang and the same attack was also found out to be vulnerable. The fix adopted also seemed to have address few other security reports of similar nature.

Thanks Jason, as issue38216 is now a separate issue we can discuss around there. I guess this issue then is not a 3.7 only regression anymore since the original issue reported predates 3.7.
History
Date User Action Args
2019-09-18 16:40:39xtreaksetrecipients: + xtreak, jaraco, orsenthil, ned.deily, mcepl, eric.snow, webknjaz, tburke
2019-09-18 16:40:38xtreaksetmessageid: <1568824838.96.0.982506616595.issue36274@roundup.psfhosted.org>
2019-09-18 16:40:38xtreaklinkissue36274 messages
2019-09-18 16:40:38xtreakcreate