fix: remove bypass-vulnerable content types from default allow lists#4365
Conversation
|
📊 Quantitative test results for language: |
|
Hello, I don’t understand why the conditional enabling of the XML/JSON processors isn’t in What you just reported is going to happen again. In my opinion, we should add a comment above 900220 stating that it is forbidden to add items to this stack without simultaneously adding a corresponding declaration to one of the body processors. |
For historical reasons and now we're stuck with
Probably, but if I had done my job right, I would have read the existing comment and realised that I was making a mistake.
That comment exists in |
|
You’re right, there’s already a long explanation about this. https://github.com/coreruleset/coreruleset/blob/main/crs-setup.conf.example#L499C1-L506C64 |
Proposed changes
Fixes #4362
Remove content types that we do not parse/process by default from the stock list of allowed request content types.
Note: This PR is intentionally limited in scope to fixing the original bypass/issue. If we want to discuss "should we add more default allowed content types?" and "should we override modsecurity.conf-recommended body processor rules in CRS?" then we can have that conversation separately.
PR Checklist
commentfield to write the expected behaviorFor the reviewer
ctl:requestBodyAccess=Offwere used in the rule