Seems to have been introduced by T187686
Malformed URIs occur when you run encodeURIComponent on something that cannot be encoded.
In addition to this there are related errors which suggest badly formed URIs
An example of error was logged against: https://meta.wikimedia.org/wiki/Special:AbuseFilter/examine/log/1173786
https://logstash.wikimedia.org/goto/6cf2e0423504d87aca00920e9b5b8046