8000 Rule 921150 (PL1) disallows newlines in ARGS_GET · Issue #623 · coreruleset/coreruleset · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
8000

Rule 921150 (PL1) disallows newlines in ARGS_GET #623

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
CRS-migration-bot opened this issue May 13, 2020 · 2 comments
Closed

Rule 921150 (PL1) disallows newlines in ARGS_GET #623

CRS-migration-bot opened this issue May 13, 2020 · 2 comments

Comments

@CRS-migration-bot
Copy link

Issue originally created by user lifeforms on date 2016-10-21 16:17:42.
Link to original issue: SpiderLabs/owasp-modsecurity-crs#623.

Rule 921150 (PL1; HTTP Header Injection Attack via payload (CR/LF deteced)) disallows \r and \n in ARGS_GET. This seems too overbroad since it will block any GET form with a newline.

Test: curl 'http://localhost/?text=its%0D%0Ame'

I think this rule is not very productive. It just matches on (\n|\r) in ARGS_NAMES (fair enough) and ARGS_GET (that seems WAY too strict, especially for PL1).

If we want to check for header injection, it seems much better to match on something that looks like an actual HTTP header name: (\n|\r)\s*[\w\d\s_-]*: There is some precedent for that, there are already similar rules listing some blacklisted HTTP headers specifically (921120 and 921160).

Even if we make rule 921150 more specific to look for a full header name, I still think it will hit some false positives though. But maybe not at the current unsustainable level.

So I think we should either:

  • extract ARGS_GET checking of (\n|\r) to a separate rule at higher level, e.g. PL3-PL4, and see how the rest of the rule fares (quick win)
  • match on anything that looks like a real header, however, since we already have a blacklist in PL1, we might do this in PL2 (this option would involve some work)
@CRS-migration-bot
Copy link
Author

User dune73 commented on date 2016-10-22 05:05:22:

I prefer the quick win. 921150 came in fairly late in the 2.2.X cycle. So it is not really tested a lot. My exposure to GET forms is very low, so I did not think that much from it. I think PL3 would be the right place for ARGS_GET.

@CRS-migration-bot
Copy link
Author

User lifeforms commented on date 2016-10-31 12:29:53:

Moved discussion to the PR #633.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant
0