I would strongly recommend upgrading to 2.4.60+ and not using UnsafeAllow3F or UnsafePrefixStat. This is related to 2 recently discovered vulnerabilities in Apache HTTP Server. There are few details available at the moment, but they have the potential to be fairly bad.
The Issue
Now, the first one, the one that you're running into, is not in and of itself too bad. It didn't get a CVE score at all. The second one got a score of 9.1/10. Given that they were discovered at the same time, by the same person, in the same area of the code, I would bet that they are closely related and that you will be much safer if you patch both.
Other people have mentioned that there are not many details. This is good: you have time to patch. Bad news: there is a deadline for patching. Per this tweet https://x.com/orange_8361/status/1807820224659706233, Orange Tsai will be describing the vulnerabilities in a lot more detail at Black Hat, and at that point, you will see a lot more exploitation of these issues.
How to address it
The issue here is not question marks in URLs as such. It is url-encoded question marks in URLs that are used for serving static files.
Bad version:
- example.com/images?route=/cats/long-hair%3fsize=large
- example.com/login?returnto=/cats/long-hair%3fsize=large
Good versions:
- example.com/images/cats/long-hair?size=large
- example.com/login?returnto=/cats/long-hair&returntoparams=size%3dlarge
Changing all instances of this may be a pain. Security is like that, I'm sorry. But these vulnerabilities are low-complexity, relatively high impact, and about to be documented publicly in a lot more detail. I would not want to be vulnerable if someone decides that these are good bugs for mass exploitation.