This is a known problem with the "CrossSiteScripting_BODY
" WAFv2 rule provided by AWS as part of the AWSManagedRulesCommonRuleSet
ruleset. The rule will block any input that matches on*=*
In a form with multiple inputs, any text that has " on
" in it will likely trigger this rule with false positive, e.g. a=three two one&b=something else
In Sept 2021, I complained to AWS Enterprise Support about this clearly broken rule and they replied "Its better to block the request when in doubt than to allow a malicious one", which I strongly disagree with. The support engineer also suggested that I could attempt to whitelist inputs which have triggered this rule, which is totally impractical for any non-trivial web app.
I believe the rule is attempting to block XSS attacks containing scripts like onerror=eval(src)
, see https://cheatsheetseries.owasp.org/cheatsheets/XSS_Filter_Evasion_Cheat_Sheet.html#waf-bypass-strings-for-xss
I would recommend excluding all the black box CrossSiteScripting rules from your WAF, as they are not fit for purpose.
+on
or/on
in HTTP POST was blocked e.g. "/dBV6+ON23vgWCNw==" or "/m18Vm/OneccWI51Yz==" was blocked. We had to disableCrossSiteScripting_BODY
inAWSManagedRulesCommonRuleSet
to get it working. – Sparker