4

Why is PUT method not allowed and how can I allow PUT methods without changing REQUEST-901-INITIALIZATION.conf file and REQUEST-911-METHOD-ENFORCEMENT.conf file. RuleID 91100

RuleID 901160

1

2 Answers 2

7

I suspect that this is largely a legacy thing, because the list of allowed methods (GET HEAD POST OPTIONS) in the CRS hasn't changed for at least 12 years and probably longer.

Historically the PUT method was used by WebDAV to allow files to be created on the web server - which if misconfigured became an unauthenticated file upload vulnerability as it allowed an attacker to upload (or overwrite) arbitrary files on the webserver. Very much something that you'd want a WAF to block by default.

But nowadays very few people are using WebDAV, and PUT is mostly used by REST APIs, so blocking it by default doesn't make as much sense. You can allow other methods by adding them to the tx.allowed_methods variable in your CRS configuration. But it might also be worth making an issue or a pull request on the CRS GitHub to suggest changing this default behaviour, and see whether there are other reasons they want to keep it?

1
  • PUT was upload long before WebDAV; more like WebDAV was the last.
    – Joshua
    Commented Aug 30 at 3:30
1

I'm not sure there is any strict reason why only the GET, HEAD, POST and OPTIONS methods are allowed by default. I assume CRS tries to minimize the risk, and these are enough for more users.

You can enable other methods in crs.conf file: remove comment marks from rule 900200 and put all methods what you need.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .