Skip to content

libmodsecurity3: not returning 403 on response phases #3461

@EsadCetiner

Description

@EsadCetiner

ModSecurity2 on Apache handles blocks for response phases by return a 403 error along with the configured 403 error page for the http server. This is not the case for libModSecurity3 where it'll instead respond with an empty response body and won't modify the response status code.

This is usually fine, but in cases like rule 950100 for CRS where the rule intends to hide the fact an 5xx error has happened, this results in unintended data leakage (The 5xx status code being returned). This behavior can also be confusing to an end user using the http server.

libModSecurity3 should respond with an http status code of 403 (Or any configured status codes) and display the configured error page for the http server.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions