-
-
Notifications
You must be signed in to change notification settings - Fork 402
Sec-CH-UA / Sec-CH-UA-Mobile request headers are excluded from validation #2027
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thank you for reporting this @somechris. This is an error in the rule set. sec-ch-ua-mobileI agree, this should not be ignored by 920274 and that it can easily be added to the allow-list in 920275. sec-ch-uaGiven this header is a string or list of strings, I see a big potential for FPs with benign use of this header on 920274. So why do you think it should be removed from the ignore-list in 920274? @csanders: Do you care to chime in here as well? |
Most headers in HTTP traffic are strings that could potentially hold values for FPs and trigger 920274. Yet only a few of them are ignored from 920274. The thing is that in benign real-world traffic, the The As benign, real-world If at some point benign, real-world traffic comes with [1] The |
Thank you for your extensive explanation @somechris. This makes a lot of sense. This sounds like you are really running at PL4. Is that a substantial amount of traffic? If yes, that's very interesting for us, since it is very rare (I only have customers at PL4 with relatively little traffic). How do you assess ignoring the User-Agent in 920274 (and referer for that matter)? |
No, it's not. It's just some 5-10M reqs/month. While the 5-10M reqs/month is not much, it still covers enough ground to see problematic browser updates in the logs early on.
I don't have current, robust numbers on From experience of $PREVIOUS_DAYJOBS, ignoring both Leaving all other things aside, many proper, good bots come with And for So failing to ignore either [1] Both User-Agent and Referer are ignored in rule 920274 and hence do not see them in modsecurity log files (except for matches in rule 920300 and the like. But that's not representatitive). And also, I've configured webserver's log format to only hold needed information, so both User-Agent and Referer get dropped in my webserver logs. 9948 |
Thank you very much for your extensive discussion of the various headers. This is very valuable for us. Closing the issue here (and merging #2028 which fixes this). |
Description
The
Sec-CH-UA
andSec-CH-UA-Mobile
are simply excluded from rule 920274 and not validated.Sec-CH-UA-Mobile
is a Structured Header boolean and can be validated by rule 920275.Sec-CH-UA
is most likely collateral damage from excludingSec-CH-UA-Mobile
, andSec-CH-UA
does not need to get excluded from rule 920274 at all.For example:
curl --header 'Sec-CH-UA-Mobile: foo' https://$YOUR_SITE/
fails to trigger a rule on paranoia level 4.
Your Environment
Confirmation
[x] I have removed any personal data (email addresses, IP addresses,
passwords, domain names) from any logs posted.
The text was updated successfully, but these errors were encountered: