8000 CRS3 Rule 950100 (RESPONSE_STATUS checking) must be phase 3 · Issue #3936 · coreruleset/coreruleset · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

CRS3 Rule 950100 (RESPONSE_STATUS checking) must be phase 3 #3936

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
rainerjung opened this issue Nov 14, 2024 · 3 comments
Closed

CRS3 Rule 950100 (RESPONSE_STATUS checking) must be phase 3 #3936

rainerjung opened this issue Nov 14, 2024 · 3 comments
Labels
🐛 bug Something isn't working

Comments

@rainerjung
Copy link

In CRS 3 rule 950100 in file RESPONSE-950-DATA-LEAKAGES.conf checks RESPONSE_STATUS against 5xx. Such a response should lead to a 403 forbidden. Since the rule is running in Phase 4, the response body is already being sent to the client, before at the end of phase 4 the denial kicks in.
This is observable when the response is sent with chunked encoding, for instance it comes from a proxied backend and its size is bigger than 8KB. Or it comes from a CGI script.

In fact, the status code is known in phase 3, response headers, so it is better to run the rule there and this also leads to correct behavior.

In CRS 4 some rules have been moved to more appropriate earlier phases. One of them is this rule 950100.

Maybe one can backport the whole of 5a47465, but if this is to risky, at least fixing rule 950100 would be nice.

Trivial change: "phase:4" => "phase:3".

Thanks a lot for providing the CRS!

Best regards,

Rainer

@rainerjung rainerjung added the 🐛 bug Something isn't working label Nov 14, 2024
@airween
Copy link
Contributor
airween commented Nov 14, 2024

Hi @rainerjung,

thanks for this report - well, I think you're definitely right, rule 950100 correct phase is phase:3. The mentioned commit belongs to #1941, but that was added to branch v3.4/dev, which wasn't released ever and that wasn't back-ported. But - as I remember - CRS4 derived from that. Probably this is why the rule is in the right phase.

PR #1941 was sent by me, I hope I still have the script which collected the rules. I try to run that against v3.3 again, and made the fix that you mentioned.

Thanks again.

@airween
Copy link
Contributor
airween commented Nov 18, 2024

FYI: #3941 is prepared.

@fzipi
Copy link
Member
fzipi commented Nov 27, 2024

PR was merged, closing. Will be available in our next release!

@fzipi fzipi closed this as completed Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants
0