False Positives with PL4 rule 920274 (msg: Invalid character in request headers (outside of very strict set))
See original GitHub issueDescription
I have a lot of false positives with PL4 rule 920274 (I know it’s PL4!)
The rule’s message is: Invalid character in request headers (outside of very strict set)
Audit Logs / Triggered Rule Numbers
Although it is a PL4 rule, in my opinion it is far too strict and I would like to relax it.
Rule violations I often see:
Sec-CH-UA
: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-CH-UA. Hint: REQUEST_HEADERS:Sec-CH-UA-Mobile is already excluded from this rule.REQUEST_HEADERS:from=googlebot(at)googlebot.com
REQUEST_HEADERS:x-authenticated-user=someone@somewhere.xy
REQUEST_HEADERS:via=1.1 172.x.y.z (McAfee Web Gateway 10.2.3.38089)
or other versionsREQUEST_HEADERS:x-user-identity=name@somedomain.xy
- Exchange autodiscover requestsREQUEST_HEADERS:x-anchormailbox=name@somedomain.x
y - Exchange autodiscover requestsREQUEST_HEADERS:from=bingbot(at)microsoft.com
- bingbot indexing
I would like to do the following two changes to the rule:
- Add an exclusion for
Sec-CH-UA
like we already have forSec-CH-UA-Mobile
- Add the brackets
(
and)
and maybe the@
to the list of allowed characters
What do you think. Is it worth improving a PL4 rule? I would say yes, because I think we should always allow compliant requests, even at PL4.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
False positives on 920274 for From Header ... - GitHub
It complicates the rule 920274 or costs everybody cycles if adding exclusion to 905. People working in PL4 are perfectly capable of excluding...
Read more >Handling False Positives with the OWASP ... - netnea
Rule 920273 Invalid character in request is pretty much self explanatory. It's a very strict rule at paranoia level 4 and it fights...
Read more >request-920-protocol.. - Index of /
The OWASP ModSecurity Core Rule Set is distributed under # Apache Software ... msg:'Invalid character in request headers (outside of very strict set)',\ ......
Read more >ModSecurity CRS Rule Group 920 Protocol Enforcement
920420 In case Content-Type header can be parsed, check the mime-type against 920274 Invalid character in request headers (outside of very strict set) ......
Read more >How to tune your WAF installation to reduce false positives
ModSecurity, the WAF engine, is most often used in coordination with the OWASP ModSecurity Core Rule Set (CRS). This creates a first line...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok, thank you both! I’ll open a PR.
I second @lifeforms’ opinion here.
As for
@
: It’s role in the DOM model gives it a role in many XSS exploits. See https://portswigger.net/web-security/cross-site-scripting/cheat-sheet