8000 Rule 921120: False positive · Issue #1615 · coreruleset/coreruleset · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Rule 921120: False positive #1615

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 · 6 comments · Fixed by #1805
Closed

Rule 921120: False positive #1615

CRS-migration-bot opened this issue May 13, 2020 · 6 comments · Fixed by #1805
Labels
➕ False Positive PR available this issue is referenced by an active pull request

Comments

@CRS-migration-bot
Copy link

Issue originally created by user Taiki-San on date 2019-10-29 15:44:54.
Link to original issue: SpiderLabs/owasp-modsecurity-crs#1615.

Type of Issue

False positive.

Description

The regex doesn't check if there is a payload after fairly common keywords.
We had a false positive on the pattern ...\r\n\r\nlocation:\r\n....
This specific case could have avoided if the regex was followed by something like \s+\w+.
What do you think?

Confirmation

[X] I have removed any personal data (email addresses, IP addresses,
passwords, domain names) from any logs posted.

@CRS-migration-bot CRS-migration-bot added ➕ False Positive PR available this issue is referenced by an active pull request labels May 13, 2020
@CRS-migration-bot
Copy link
Author

User franbuehler commented on date 2020-03-02 14:53:53:

Yes, I think this issue could be solved by adding a \s\w+ maybe even a \s+[\w.:/]+ after location: so that all sorts of valid location headers match.

But, as far as I know empty headers are valid too, but they are ignored by the browser. So we potentially add an evasion here.

That's why I would only add my suggested regex to the location header and not all of the headers in this rule.
Original rule regex: [\r\n]\W*?(?:content-(?:type|length)|set-cookie|location):

Other opinions?

@CRS-migration-bot
8000
Copy link
Author

User dune73 commented on date 2020-03-02 14:58:34:

No, I can not see where an empty contnt-type, content-length, set-cookie or location header can be considered standard behaviour. Sure, the protocol does allow it, but that does not mean that it happens in real life.

@CRS-migration-bot
Copy link
Author

User franbuehler commented on date 2020-03-02 15:02:23:

So I add my suggested regex to all headers?

@CRS-migration-bot
Copy link
Author

User dune73 commented on date 2020-03-02 15:03:07:

I think that should work, yes.

@CRS-migration-bot
Copy link
Author

User franbuehler commented on date 2020-03-02 15:08:02:

Ok, I'll do that. Thanks for your fast feedback!

@CRS-migration-bot
Copy link
Author

User dune73 commented on date 2020-03-04 08:04:25:

Decision during the CRS project chat on March 2, 2020: franbuehler will solve this.

SpiderLabs/owasp-modsecurity-crs#1683 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
➕ False Positive PR available this issue is referenced by an active pull request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant
0