ASP.NET implements various algorithms for securing ASP.NET websites against potentially malicious user requests, for example, by rejecting requests that contain characters susceptible to be used in XSS attacks, suspiciously long request paths, etc.
When potentially malicious requests hit a Sitecore website, they would result in different errors either shown to the website visitor or written to Sitecore log files.
You can see the multiple types of scenarios for this.
The error you are getting comes when the requested URL contains invalid characters.
You need to follow below steps to verify that the links you render on the pages do not contain the invalid characters mentioned in the error message:
For the links rendered using the Sitecore API, ensure that the encodeNameReplacements block in the Web.config file contains the appropriate record:
<replace mode="on" find="INVALID CHARACTER" replaceWith="REPLACING CHARACTER" />
For the links generated by custom code, manually verify that they do not contain these characters and their encoded counterparts.
In case you do want to use these characters in the path, add the requestPathInvalidCharacters attribute to the httpRuntime node in the Web.config
file as follows:
<httpRuntime ... requestPathInvalidCharacters="<,>,*,%,&,:,\,?"/>
Then exclude particular characters from this list.
For more see the Sitecore KB article - https://kb.sitecore.net/articles/031258