You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Information disclosure - statuscode response containing WAF type #1975
The response status code of a blocked request contains the text: "ModSecurity Action"
This way an attacker could find for specific security holes in this product.
It would be great if this text could be changed by parameter, or not send at all.
On the other hand it might not be that much better than the status quo. Since IIS appears to normally populate the reason-phrase, leaving it empty could be enough to give a malicious actor a clue.
Populate the reason-phrase on the status-line with the standard text(s)
This is reasonable, but I'd prefer to be able to set these using the Native API. Unfortunately, I cannot find anything in the documentation that would allow retrieval of IIS's normal status-phrase using the 3-digit status. If anyone knows how to do this and would like to share, it would be appreciated.
The alternative is to duplicate those phrases directly in ModSecurity's IIS code. If we only had to concern ourselves with 400 and 403 that might be reasonable. But since we support more flexibility than that, this approach becomes increasingly unappetizing.
Revisiting this one. Still the case: iis/mymodule.cpp sets the status line reason phrase to "ModSecurity Action" in two places. Of @martinhsv's options, an empty reason phrase is the smallest change and RFC 7230 explicitly allows it. The open IIS PRs (#3613, #3618, #3620) do not touch this. 2.x IIS only; whether it is worth a PR depends on whether IIS builds are still maintained.
Activity
zimmerle commentedon Dec 10, 2018
Hi @erikvdijk,
Thank you for the report. This issue was placed in triage.
gstanchev commentedon Nov 19, 2020
Hi, any news on resolution?
zimmerle commentedon Nov 20, 2020
Hi @gstanchev,
Not really. Latests release for IIS was - v2.9.3
martinhsv commentedon Sep 16, 2022
This is not ideal behaviour. As the OP notes, intentionally giving away which WAF is protecting a site can give a malicious actor an advantage.
The two most obvious approaches here are:
The relevant RFC (https://www.rfc-editor.org/rfc/rfc7230#section-3.1.2) notes that it can be empty ("a possibly empty textual phrase describing the status code"). This is probably better than the status quo.
On the other hand it might not be that much better than the status quo. Since IIS appears to normally populate the reason-phrase, leaving it empty could be enough to give a malicious actor a clue.
This is reasonable, but I'd prefer to be able to set these using the Native API. Unfortunately, I cannot find anything in the documentation that would allow retrieval of IIS's normal status-phrase using the 3-digit status. If anyone knows how to do this and would like to share, it would be appreciated.
The alternative is to duplicate those phrases directly in ModSecurity's IIS code. If we only had to concern ourselves with 400 and 403 that might be reasonable. But since we support more flexibility than that, this approach becomes increasingly unappetizing.
fzipi commentedon Oct 12, 2026
Revisiting this one. Still the case:
iis/mymodule.cppsets the status line reason phrase to "ModSecurity Action" in two places. Of @martinhsv's options, an empty reason phrase is the smallest change and RFC 7230 explicitly allows it. The open IIS PRs (#3613, #3618, #3620) do not touch this. 2.x IIS only; whether it is worth a PR depends on whether IIS builds are still maintained.Needs a maintainer decision.