Hi Alex
Rule ID 920420 is part of the OWASP Core Rule Set (CRS) used by Azure WAF (both App Gateway and Front Door). This rule is designed to detect potentially malicious or unexpected content types in HTTP headers, particularly the Content-Type header.> Does 920420 ruleID evaluates/inspects only the Content-Type header in the requests?
If yes, then creating an exclusion with matchVariable as HeaderName Equals Content-type, is basically equivalent to disabling that ruleID, right?
Yes, your understanding is correct.
Azure WAF rule ID 920420 specifically inspects the Content-Type
header in incoming HTTP requests. It is part of the Default Rule Set (DRS) and is categorized under protocol enforcement. The rule is triggered when the Content-Type
header contains a value that is not allowed by policy, such as application/gzip
, */*
, or other non-standard or potentially risky types
Creating an exclusion with matchVariable set to RequestHeaderNames and selectorMatchOperator set to Equals with selector as Content-Type is not entirely equivalent to disabling ruleID 920420, but it effectively prevents the rule from evaluating the Content-Type header, achieving a similar outcome for that specific header. Here's the detailed explanation based on Microsoft documentation:
For further guidance, you might consider checking out the Web Application Firewall exclusion lists documentation, which covers how to configure these exclusions effectively.
I hope this helps! If these answers your query, do click the "Upvote" and click "Accept the answer" of which might be beneficial to other community members reading this thread.
If the above is unclear or you are unsure about something, please add a comment below.