tomcat7 does not handle request uri containig special characters
Bug #1659124 reported by
Ingemar Stock
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Tomcat7 |
Fix Released
|
Wishlist
|
|||
tomcat7 (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
I have a problem after upgrade from 7.0.52-1ubuntu0.7 to 7.0.52-1ubuntu0.8 on Ubuntu 14.04.5 LTS:
My application does a special request:
GET /cp-webshop-
My tomcat instance responses with 400 and generates strange log entry:
127.0.0.1 - - [01/Jan/
Note the date, other log entries before and after this one have a correct date.
May the %7C (a pipe '|') be a problem? With version 7.0.52-1ubuntu0.7 this was no problem.
Thank you for any help
Best regards,
Ingemar
CVE References
Changed in tomcat7: | |
importance: | Unknown → Wishlist |
status: | Unknown → Confirmed |
Changed in tomcat7: | |
status: | Confirmed → Fix Released |
To post a comment you must log in.
Using the protocol="HTTP/1.1" connector (Coyote)
After upgrading a site to Tomcat 7.0.73 from 7.0.72 or from anything earlier, a url with an unencoded { or } (ie. http:// my.com? filter={"search" :"isvalid" } ), now returns a 400 error code and logs the following error message:
"INFO: Error parsing HTTP request header IllegalArgument Exception: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986"
Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.
java.lang.
Resolution:
Since this is a breaking change (aka regression failure), there should be an option to override and turn this off (still reporting the first occurrence as shown above), so that any existing site which experiences this can choose to ignore this failure and continue as before, so they can deal with changing their application at a later date, if they deem the security risk is appropriate.
Defaulting the option to true (to enable the check) is perfectly fine, as long as there is an option in a server and/or application config file to disable it, and proper documentation on it.
Either this, or you clearly state in the release notes of 7.0.73, exactly what will break, and recommend that users do not perform the Tomcat update, if they are not ready to change their applications to comply, but I think this would open up an even bigger can of worms.
Instead of just saying:
"Add additional checks for valid characters to the HTTP request line parsing so invalid request lines are rejected sooner. (markt)" - this tells us nothing about the impending doom we may face.
But, I would recommend just giving us the option to decide for ourselves.